NGINX+UWSGI deployment

Source: Internet
Author: User

Installing Nginx configuration nginx configuration file usr/local/nginx/conf/nginx.conf
Location/{
root HTML;
Index index.html index.htm;
Uwsgi_pass 45.64.112.4:8080;
Include Uwsgi_params;
}

Add a Jump Address
Uwsgi_pass 45.64.112.4:8080; # (to be consistent with UWSGI configuration)
Include Uwsgi_params;

Start Nginx
cd/usr/local/nginx/sbin/
./nginx


Installing UWSGI
Create a new profile at the root of the project Start.ini (why not do research in the root directory, you should specify the address is OK.) This is the INI file. You can also write XML JSON configurations. But the tests failed. Wrote again later.
[Uwsgi]
Socket = 45.64.112.4:8080#flask Service address, port
processes = Number of 4# links (may be incorrect)
threads = number of processes (possibly wrong)
Master = True
Pythonpath =/home/python/project/webapp #项目根目录
module = Start #启动文件名称 start.py Write start
Callable = App #实例化Flask的变量名称 app
Memory-report = True
Daemonize =/root/project/hello/uwsgi.log #设置后台日志输出 (write this uwsgi will be executed in the background)

Start Uwsgi
Uwsgi--ini Start.ini

NGINX+UWSGI deployment

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.