1 uwsgi.ini
[uwsgi]
socket=127.0.0.1:8000
chdir=/xx/xx/xx/mysite
module=mysite.wsgi:application
processes = 4
threads = 2
master=True
pidfile=/tmp/poll-master.pid
vacuum=True
;max-requests=5000
;daemonize=./polls.log
2 config nginx.conf
location / {
# root html;
# index index.html index.htm;
uwsgi_pass 127.0.0.1:8000;
include uwsgi_params;
}
3 先启动nginx
nginx
uwsgi uwsgi.ini