[uwsgi]
chdir=/data/www/web
home = /data/www/web/VENV
module=current.web.wsgi
master=True
pidfile=/data/www/web/momoxiaoming_django.pid
vacuum=True
max-requests=5000
#daemonize=/data/www/web/momoxiaoming_django.log
#0.0.0.0:8080
socket =/data/www/web/mxonline.sock
chmod-socket = 777
[program:web]
command=/data/www/web/VENV/bin/uwsgi --ini /data/www/web/uwsgi.ini
stderr_logfile=/data/www/web/err.log
startsecs=3
stopsignal=KILL
stopasgroup=true
killasgroup=true
#environment=PYTHONPATH=’$PYTHONPATH:/data/www/Project/VENV’
apache正常配置指向项目
nginx 需要指向sock或者ip+端口
server {
listen 8005;
server_name *****;
charset utf-8;
client_max_body_size 75M; # adjust to taste
location / {
include uwsgi_params; # the uwsgi_params file you installed
uwsgi_pass unix:/data/www/Project/mxonline.sock;
#uwsgi_pass 0.0.0.0:8080; #/data/www/Project/mxonline.sock;
}
location /static {
alias /data/www/Project/static;
}
}
supervisor命令
重新生成配置文件
echo_supervisord_conf > /etc/目录/supervisord.conf
更新配置文件:supervisorctl -c /etc/supervisord.conf reload
重启项目 supervisorctl restart projectname