I am running a flask app using gunicorn behind nginx proxy and am trying to get the gaiohttp worker to work. The app just returns 404 for all URLS when the gaiohttp worker is selected
When using the sync or gevent workers everything works fine. Also not running directly to gunicorn and gaiohttp i.e. not using nginx it works fine.
I have read everything I can find.
Am I missing something? Is gaiohttp worker valid when running behind a nginx proxy?
My nginx config:
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
Using the latest versions of gunicorn etc etc.