标签:
网上有很多这种配置,但就是没一个靠普的,费了好大的力气才完成架构部署。顺便记录一下。
一.部署前的说明
[uwsgi]
chdir = /opt/web/testsite
module = testsite.wsgi:application
socket = /opt/web/testsite/tests.sock
chmod-socket = 666
module = testsite.wsgi
master = true
processes = 4
#vhost = true
#no-stie = true
#workers = 2
reload-mercy = 10
vacuum = true
max-requests = 5000
limit-as = 1024
#buffer-sizi = 30000
pidfile = /var/run/uwsgi.pid
daemonize = /var/log/uwsgi.log
log_format www.phalcon.cn ‘$remote_addr - $remote_user [$time_local] "$request" ‘
‘$status $body_bytes_sent "$http_referer" ‘
‘"$http_user_agent" $http_x_forwarded_for‘;
server {
listen 8088;
#server_name www.phalcon.cn;
#server_name localhost;
server_name _;
access_log /home/wwwlogs/www.phalcon.cn.log;
error_log /home/wwwlogs/error.log;
root /opt/web/testsite;
location / {
uwsgi_pass unix:///opt/web/testsite/tests.sock;
include uwsgi_params;
#uwsgi_pass 127.0.0.1:9090;
#uwsgi_param UWSGI_SCRIPT index;
#uwsgi_param UWSGI_PYHOME $document_root;
#uwsgi_param UWSGI_CHDIR $document_root;
}
access_log /home/wwwlogs/www.phalcon.cn.log www.phalcon.cn;
}
【金】nginx+uwsgi+django+python 应用架构部署
标签:
原文地址:http://www.cnblogs.com/plan/p/4959550.html