0
我运行一个烧瓶应用程序使用nginx代理后面的gunicorn,我试图让gaiohttp工人工作。当选择gaiohttp工作者时,该应用仅返回404所有URLSgunicorn与gaiohttp工人总是返回404与烧瓶的应用程序
当使用同步或gevent工作者时,一切正常。也不直接运行gunicorn和gaiohttp,即不使用nginx它工作正常。
我已阅读了所有我能找到的东西。
我错过了什么吗?运行在nginx代理后面时,gaiohttp worker是否有效?
我的nginx的配置:
location /app {
proxy_pass http://127.0.0.1:9002;
rewrite /app(.*) /$1 break;
proxy_redirect off;
proxy_buffering on;
proxy_pass_header Server;
proxy_set_header X-Scheme $scheme;
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-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Script-Name /app;
}
gunicorn:
/usr/bin/gunicorn --workers 2 -k gaiohttp -b 127.0.0.1:9002 app:app
使用