Question

I reset my root password on my droplet and now am getting a 502 bad gateway error.

Posted October 17, 2016 1.9k views
FAQDigitalOceanDeployment

How do I get the site back up and running? I am quite new to the community so I am not sure what I am doing. I wanted to access the files via SFTP but didn’t have the original root password so I reset it in order to access it now the site is giving me 502 bad gateway error. And I am not sure how to fix it.

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.

×
2 answers

That is unusual. A password reset can force a reboot of the droplet. If your nginx was proxying for another service like node.js/ruby or something else, make sure that the underlying service is running and restart it if it is not.

So basically, mine was a Django project.After resetting my root password, I re-activated my virtual environment and restarted nginx and gunicorn.This solved my error.

Nginx restart : sudo service nginx restart
Gunicorn restart : gunicorn –reload <your wsgi folder name>.wsgi —bind 0.0.0.0:8000

Submit an Answer