1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > centos7.5 部署flask+nginx+uwsgi+python3

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

时间:2019-09-13 06:55:03

相关推荐

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

独角兽企业重金招聘Python工程师标准>>>

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;

***装不上uwsgi

pip安装uwsgi失败解决缺少一个python-devel包yum源上下载安装对应python版本的python-develyum install shiboken-python36-devel.x86_64

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。