502 Bad Gateteway when trying to access the website

Hi all,

I created a droplet using the Django image in the marketplace. I downloaded an existing django project with gitclone and changed the nginx configuration.

(All my static files is working) exemple :

But, i tryied to change the gunicorn configuration, and when i restarted gunicorn and nginx (deamon-reload too) i have this error in my nginx log :

Failed(13: Permision denied) while connecting to upstream (referer to my css)

I don’t know how to view gunicorn logs. The file i edited was /etc/systemd/system/guinicorn.service and i only renamed all django_project to my new folder name

I need 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 @florentvandroy,

The error suggests the issue is with your permissions/ownership of files rather than anything in the configuration.

What I’ll recommend is making sure everything is correct by going to the folder in question

cd /path/to/website

Using ls -lah You should be able to see the ownership and the permissions of the files. Please make sure everything is configured correctly. If you are unsure, you can post the output from the previous command here.

Regards, KDSys