Nginx+uwsgi+python python.org pythonxy Python3.

Source: Internet
Author: User
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.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.