uwsig.ni 配置:
[uwsgi]master=truesocket=127.0.0.1:9001home=/opt/www/env-0.1 注释:这个应该是一个virtualenv的home路径processes=4enable-threads=truethreads=4socket-timeout=300reload-mercy=10vacuum=truemax-requests=5000limit-as=512buffer-size=30000daemonize=/var/log/uwsgi.logmemory-report=truechdir=/opt/www 注释:这个应该是Django项目的根路径pythonpath=/opt/www/setting 注释:这个应该是Django项目setting.py所在的文件夹路径module=wsgilogformat=%(addr) - "%(user)" [%(ltime)] %(host) %(method) "%(uri)" %(proto) %(status) %(micros) %(size) "%(referer)" "%(uagent)"
nginx 配置:
server { listen 80; charset utf-8; root /tmp; location / { uwsgi_pass 127.0.0.1:9001; include uwsgi_params; }}