I'm trying to get my server back online after an upgrade, and I can no longer seem to get Nginx to direct calls to Gunicorn - every request I send to the site gets back a 502 Bad Gateway
. I have gunicorn_django
running on port 8001 (as I can see from ps aux | grep gunicorn
- the commands for the two workers have the argument -b 0.0.0.0:8001
. My Nginx configuration has the following at the top of my only config in sites-enabled
:
upstream django_test {
server 127.0.0.1:8001;
}
...so it should be directing requests to there. Nothing has changed about this config file since the upgrade.
When I visit mysite.com/robots.txt
in my browser, it returns the robots.txt
that I've defined in my sites-enabled
config, so that file is definitely getting loaded. Furthermore when I run curl 127.0.0.1
from the server I still get the 502 bad gateway
.
Does anyone know what could be happening here?