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
使用