Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
502 Bad Gateway Error on Ubuntu/NGINX/Unicorn/Django Website
Hi i followed along on the great tutorial here:
And i was able to get things working on both a test server and on my live website.
But after a few days i got a 502 Bad Gatway Error on my domain.
I’ve spent the last two days trying to fix the problem to no avail. I’m assuming its some sort of permissions issue between NGINX and Gunicorn but have no idea what the problem might be.
The gunicorn error log is saying that it can’t connect to the sock file.
The NGINX error log is showing a connect to sock failed error.
I’ve tried to change firewall settings, user permissons, paths everything it seems and still not working.
Anyone have any idea what might be the issue here?
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.×