Report this

What is the reason for this report?

502 Bad Gateteway when trying to access the website

Posted on March 12, 2020

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 : http://104.248.163.114/static/css/app.min.css

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



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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.