502 Bad Gateway nginx/1.1.19 on django
Error 502 Bad Gateway means that the NGINX server used to access your site couldn't communicate properly with the upstream server (your application server).
This can mean that either or both of your NGINX server and your Django Application server are configured incorrectly.
Double-check the configuration of your NGINX server to check it's proxying to the correct domain/address of your application server and that it is otherwise configured correctly.
If you're sure this isn't the issue then check the configuration of your application server. Are you able to connect directly to the application server's address? If you are able to log in to the server running the application, you can try localhost:<port> using your app's port number to connect directly. You can try it with curl to see what response code you get back.
I am new to this. I took the image of running django application and spawned the new vm that points to a different database but I am getting this "502 Bad Gateway  nginx/1.1.1"
when i tested this in development mode, it works fine but not otherwise.
i looked into /var/log/nginx/access.log and error.log but nothing found there.
Any help would be appreciated