Python/ Django- Internal Server Error after performing a soft reset
If you're getting a 'bad gateway', that means you're using something like Nginx or Apache to route requests to your app. 
A Bad Gateway error means that Nginx (substitute Apache if appropriate, I'll just use nginx here) isn't getting a response from the app server - your runserver equivalent isn't serving the app, or the app is returning a 500 error.  
The app server is usually served with gunicorn, uwsgi or sometimes just plain ol' runserver (but please don't do this in production!) 
You can access your nginx logs at /var/log/nginx/error.log - it'll probably say connect() failed (110: Connection timed out) while connecting to upstream, with an IP address.  
SSH to your server, run the virtualenv if you have one.  If gunicorn is running, stop it.  
Do which gunicorn (again, substitute uwsgi if appropriate) to get the location, and run that manually: 
/etc/gunicorn/gunicorn -b 127.0.0.1:8000 -w 1 myapplication.wsgi 
and note the error message.  You can also get this by doing runserver to see what's happening - if the app loads, then go to the website and see what the error message is in your terminal console.  
It's probably a misconfiguration that's stopping the app from running - that's where you'll get your more detailed debug information.
I recently made some changes to my Python/ Django project, and this caused one of the pages to display a 'Bad Gateway' message in the browser. I was unable to resolve this, so tried doing a 'soft reset' to the last working commit I had made. However, I am now getting an Internal Server Error when trying to view the website on the live server.
The error message doesn't give any more information than this... but when I view my project locally in the browser, it works as expected.
I've tried committing my local version, pushing it to the server, and then pulling it on the server again, but on the master branch on my local machine and on the server, I get a message telling that there's "nothing to commit, working directory clean".
How can I resolve this Internal Server Error to ensure that my site is accessible again?