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