我使用uWsgi
在這裏部署我django
網站是我的uWsgi.ini
:uWsgi nginx的積分誤差
[uwsgi]
socket=/var/run/uwsgi.sock
virtualenv=/root/edupalm/env/
chdir=/root/edupalm/edupalm
master=True
workers=8
pidfile=/var/run/uwsgi-master.pid
max-requests=5000
module=edupalm.wsgi:application
,並使用nginx的,這裏是我的配置:
server {
listen 9000;
server_name 162.243.146.127;
access_log /var/log/nginx/edupalm_access.log;
error_log /var/log/nginx/edupalm_error.log;
location /static/ {
alias /root/edupalm/edupalm/static/;
}
location/{
uwsgi_pass unix:///var/run/uwsgi.sock;
}
}
,但我有502 Bad Gateway
這裏是日誌:
nginx的:
2013/11/26 08:31:09 [error] 1758#0: *57 upstream prematurely closed connection while reading response header from upstream, client: 197.160.112.183, server: 162.243.146.127, request: "GET /admin HTTP/1.1", upstream: "uwsgi://unix:///var/run/uwsgi.sock:", host: "162.243.146.127:9000"
uwsgi:
-- unavailable modifier requested: 0 --
nginx
是在用戶www-data
和uwsgi
運行運行爲root
你的uwsgi日誌裏有什麼? – Jannis