前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >centos7.5 部署flask+nginx+uwsgi+python3

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

作者头像
用户2337871
发布2019-07-19 16:02:49
8050
发布2019-07-19 16:02:49
举报
文章被收录于专栏:gitgit

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

========= vi run.sh uwsgi -d --ini uwsgi.ini ========= sh run.sh ---shell执行命令

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档