wget http://projects.unbit.it/downloads/uwsgi-latest.tar.gz-------------python uwsgiconfig.py --build
Django------------python setup.py install
django-admin createproject oursite
-----------------------------------------------
cd /path/to/uwsgi
uwsgi.xml
<uwsgi> <socket>0.0.0.0:8000</socket> <listen>20</listen> <master>true</master> <pidfile>/usr/local/nginx/uwsgi.pid</pidfile> <processes>2</processes> <module>django_wsgi</module> #这个文件下面要建立 <pythonpath>/root/my_django</pythonpath> #刚才建立项目的路径 <profiler>true</profiler> <memory-report>true</memory-report> <enable-threads>true</enable-threads> <logdate>true</logdate> <limit-as>6048</limit-as> </uwsgi> |
nginx
server { listen 80; server_name 192.168.0.100; location / { root /root/my_django; uwsgi_pass 127.0.0.1:8000; include uwsgi_params; access_log off; }} |
启动uwsgi和nginx
/usr/local/nginx/sbin/nginxuwsgi -x /root/my_django/uwsgi.xml & |
浙公网安备 33010602011771号