Reference materials:
uwsgi official information:
* http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
http://uwsgi-docs.readthedocs.org/ en/latest/WSGIquickstart.html
Command line browser for testing: http://www.geekfan.net/9045/
Others’ notes (uwsgi compilation and installation):
*http ://blog.csdn.net/chenggong2dm/article/details/43937433
The key points are as follows:
virtualenv uwsgi-tutorial <span>cd </span>uwsgi-tutorial <span>source </span>bin/activate
pip install Django django-admin.py startproject mysite <span>cd </span>mysite
pip install uwsgi 如果pip安装报错,则编辑安装如下: <pre class="brush:php;toolbar:false"><span>wget http://projects.unbit.it/download/uwsgi-latest.tar.gz tar zxvf uwsgi-latest.tar.gz <span>cd</span> <dir> make</span>
Test: ------------------------------------------------
<p>Create a file called <code><span>test.py</span></code>:</p><p></p><p></p><pre class="brush:php;toolbar:false"><span># test.py</span> def application<span>(</span>env, start_response<span>)</span>: start_response<span>(</span><span>'200 OK'</span>, <span>[(</span><span>'Content-Type'</span>,<span>'text/html'</span><span>)])</span><span>return</span><span>[</span>b<span>"Hello World"</span><span>]</span><span># python3</span><span>#return ["Hello World"] # python2</span>
path/uwsgi --http :8000 --wsgi-file test.py 可用命令行浏览器本机测试,或网络上客户端直接测试均可
------------------------------------------------
The above introduces django uwsgi nginx, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.