1. Install Nginx and add scripts
install nginx
Scripting references: Nginx startup scripts and Chkconfig management in CentOS
2. Compiling Uwsgi
wget http://projects.unbit.it/downloads/uwsgi-2.0.6.tar.gztar zxvf uwsgi-2.0.6.tar.gzcd uwsgi-2.0.6make
Then copy the compiled UWSGI to the system directory
cp ./uwsgi /usr/bin/
3. Configure Nginx
vim /etc/nginx/nginx.conf
Add include/etc/nginx/sites-enabled/*.conf at the end;
Then create a new sites-enabled folder, and make a tzw0745.cn.conf
Reference: Nginx+uwsgi Installation and configuration
Reference configuration file:
server { listen 80; server_name tzw0745.cn; location / { include uwsgi_params; 127.0.0.1:9090; }}
4. Configure the UWSGI site
Establish a UWSGI boot configuration file at the site root, such as
<uwsgi><pythonpath>/var/www/tzw0745
pythonpath> #网站根目录<module>run
module> #主文件<callable>app
callable> #程序入口<socket>127.0.0.1:9090
socket> #监听端口<processes>1
processes> #线程数<py-autoreload>1
py-autoreload> #自动重载
uwsgi>
5. Other
uwsgi -x abc.xml -d uwsgi.logkillall -9#接结束进程
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the Nginx+uwsgi+python, including the python,nginx aspects of the content, I hope that the PHP tutorial interested in a friend helpful.