Report this

What is the reason for this report?

502 Bad Gateway Ngnix & Gunicorn

Posted on January 20, 2014

Hey guys,

I followed these: https://www.digitalocean.com/community/articles/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn intrstuctions to get my Django project up and running on my Droplet.

Problem is I’m getting a 502 Bad Gateway Error for some strange reason.

Has anyone stumbled upon the same issue? All help is appreciated.

Thanks!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Check Gunicorn’s error logs, what do you see?

I had the same and just had to restart gunicorn with service supervisor restart

Hope that helps.

@kpennel: Is Gunicorn running? <pre>sudo netstat -plutn | grep -i unicorn <br>sudo ps wwaux | grep grep -i unicorn</pre>

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.