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

 

 

 

#user root;

#user root nginx;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章