centos7.5 部署flask+nginx+uwsgi+python3

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

扫描二维码关注公众号,回复: 9086390 查看本文章

#user root;

#user root nginx;

发布了76 篇原创文章 · 获赞 19 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/a289237642/article/details/90440343