Nginx Flask Aws 502 Bad Gateway
Solution 1:
The HTTP status code 502 normally means that the application server Nginx is proxying to is not running. As this is a Flask app I presume this is something like Gunicorn or uwsgi. Check to see if that is running.
I normally use something like Supervisor to ensure that the application server gets restarted automatically if it goes down.
Solution 2:
It usually happens when the service isn't running.
So I'd bet your flask application or wsgi
isn't running.
Solution 3:
I believe that gunicorn
is not running on your system. Check the status of gunicorn process, and if it is not runningm start the process
Solution 4:
Looking at your error
it mentions 123.49.616.74, server: app.example.com.au
, I think within your configuration you have mentioned the IP address of your server. Replace that with your local IP i.e 127.0.0.1
.
Since you are making the request as 127.0.0.1
in your browser and host
specified in the Nginx configuration is: "app.example.com.au". Due to this connection will be refused by the server.
Post a Comment for "Nginx Flask Aws 502 Bad Gateway"