I reset my droplet password just now. Now I tried “service nginx status” and it says its not running. The error in the logs was: [emerg] 3956#0: duplicate upstream “app_server” in /etc/nginx/sites-enabled/django.save.1:1
I was able to start the nginx server by deleting the /etc/nginx/sites-available/django file as there was the same file in /etc/nginx/sites-enabled/ and maybe thats why the “duplicate upstream” error. Now nginx is running.
But,now when I open my site now I get a 502 Bad Gateway error. The error in nginx log is:
*8 connect() to unix:/tmp/gunicorn_aakar3dp.in.sock failed (2: No such file or directory) while connecting to upstream, client: 1.22.244.226, server: _, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://unix:/tmp/gunicorn_aakar3dp.in.sock:/favicon.ico”, host: “aakar3dp.in”
Did I do something wrong here? Please help.
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!
I think you delete the file with the correct upstream configuration, what the error shows is there is no socket running on /tmp/gunicornaakar3dp.in.sock
Check your socket (not sure if is a php or something else socket) configuration and correct accordingly.
Problem is still the same, /tmp/gunicornaakar3dp.in.sock does not exist, so you need to find out which socket django uses and correct nginx site conf.
check if there is any other .sock on /tmp but you should find it in django config too
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.