centos7.5 部署flask+nginx+uwsgi+python3
## uwsgi [uwsgi] master = true max-requests = 6000 processes = 6 threads = 6 chmod-socket = 664 thunder-lock = true buffer-size = 32768 # 项目的根目录 home = /root/zhijian/python # 项目的启动文件 wsgi-file = manager.py callable = app # 虚拟环境所在的相对路径的位置 venv = /root/zhijian/py3 socket = 127.0.0.1:8001 # 日志存放地 log-x-forwarded-for = true logto = /root/zhijian/ulogs/uwsgi_web.log
## nginx----vi /etc/nginx/nginx.conf
server { listen 80; server_name 39.98.188.73; root /usr/share/nginx/html;
# Load configuration files for the default server block. include /etc/nginx/default.d/*.conf;
location / { include uwsgi_params; uwsgi_pass 0.0.0.0:8001; # 指向uwsgi 所应用的内部地址,所有请求将转发给uwsgi 处 理 uwsgi_param UWSGI_PYHOME /root/zhijian/py3; # 指向虚拟环境目录 } }
# 在阿里云上申请域名---主要域名添加二级域名----申请ssl 证书
配置flask+vue注意事项 1.vue----config/index.js
2 nginx--nginx.conf
#user root;
#user root nginx;