Suddenly getting 502 Bad Gateway nginx when trying to access our site


We have a discourse site on a droplet and suddenly this morning, users started reporting the above error.

I am not a developer and have not idea what to do next. I see no way to contact Digital Ocean for help.

Thank you

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @drchevalier,

Usually this error means there is something wrong the with the application itself. Having said that, I know this isn’t much to go on so what I’ll recommend is checking your Nginx error log to see what can be causing the issues. You can check the error log at /var/log/nginx/error_log.

Please note, the location might be different depending on how you configured your Nginx configuration file. You can see the location of the error log by opening the file /etc/nginx/sites-enabled/DisCourse-CONF, where DisCourse-CONF will be the name of the config file you choose.

From the log you can see the exact error and further investigate why you are receiving it.

If you are not sure, you can post the error here, I’ll try and help out.