Flask uwsgi nginx调试. 502错误而不是调试器页面

使用uWsgi在服务器上运行Flask.

uWsgi配置

<uwsgi>
    <socket>/tmp/flask.sock</socket>
    <pythonpath>/home/reweb/flask/</pythonpath>
    <module>publicist:app</module>
    <plugins>python27</plugins>
    <uid>reweb</uid>
   <touch-reload>/home/reweb/reload</touch-reload>
</uwsgi>

nginx配置

upstream flask_serv {
    server unix:/tmp/flask.sock;
}

server {
    listen 80;
    server_name some-domain.com;

    access_log /home/reweb/log/nginx-access.log;
    error_log /home/reweb/log/nginx-error.log;

    location / {
        uwsgi_pass flask_serv;
        include uwsgi_params;
    }
}

但是没有调试器页面nginx显示我502错误.
我可以在uwsgi错误日志中看到所有Flask错误回溯.

UPDATE
找到老问题nginx + uwsgi + flask – disabling custom error pages没有答案

最佳答案

转载注明原文:Flask uwsgi nginx调试. 502错误而不是调试器页面 - 代码日志