首页 > 其他 > 详细

flask uwsgi 502错误

时间:2020-01-07 17:38:12      阅读:91      评论:0      收藏:0      [点我收藏+]
socket = 127.0.0.1:9000  之前这么写的总报502改后就没问题
 
[uwsgi]
socket = /tmp/uwsgi.sock
 
;将Flask应用运行在这个端口
master = true
wsgi-file = /zuhuobao/flaskobj/erp/server.py
 
chdir=/zuhuobao/flaskobj/erp
;后端文件名称
callable = app
;设置在收到请求时,uWSGI加载的模块中哪个变量将被调用,默认是名字为“application”的变量。即是: app = Flask(__name__) 
processes = 4   
threads = 2
daemonize = /zuhuobao/flaskobj/erp/logs/server.log
uid = www
gid = www
pidfile=uwsgi.pid
home=/zuhuobao/venv
 
 
server
    {
        listen 5000;
        server_name 你的域名;
        location / {
            include uwsgi_params;
            proxy_pass http://127.0.0.1:5001;
            proxy_http_version 1.1;
            proxy_set_header   Host                 $host;
            proxy_set_header   X-Real-IP            $remote_addr;
            proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto    $scheme;
            uwsgi_pass unix:/tmp/uwsgi.sock;
        }
        access_log  /zuhuobao/flaskobj/erp/logs/test.wechat.chexd.com.log;
        error_log  /zuhuobao/flaskobj/erp/logs/error_log.log;
 }

flask uwsgi 502错误

原文:https://www.cnblogs.com/chengfengchi/p/12162535.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!