django centos7部署 之nginx + uwsgi配置参数
亲测,可用!!!!!!!!!!!!!!!!!!!!
python3.5
uwsgi2.0.15
django 1.11
nginx 配置
upstream django { server 127.0.0.1:9090; } server { listen 80; server_name localhost; charset utf-8; #charset koi8-r; #access_log logs/host.access.log main; location / { proxy_pass http://django; }
location /static {
alias /home/nginx-logs/untitled1/myfirst/static;
}
}
}
在manage.py同级目录中新建uwsgi.ini
uwsgi
[uwsgi] chdir=/home/untitled1 http=127.0.0.1:9090 processes=4 harakiri=200 max-request=5000 pythonpath=/home/untitled1 wsgi-file=/home/untitled1/untitled1/wsgi.py daemonize=/var/log/uwsgi9090.log master=true procname-prefix=untitled1_ procname-master=untitledi1master
启动
uwsgi --ini uwsgi.ini
重载nginx配置文件
END!