Django app not being served via nginx on ubuntu 22.04

I have attempted twice to deploy a django app on ubuntu 22.04 and serve it using nginx but it doesn't work. The guide I am using has worked on previous versions of ubuntu.

Upon completion of the guide, I get an 502 gateway error. While inspecting the log errors, I get this error.

4286#4286: using inherited sockets from "6;7;"

The closest I have come to answer is this this question but the developer is working with php.

It seems it was an issue with permissions.

Inspecting logs from nginx-error.logs, I got

connect() to unix:/path/to/gunicorn.sock failed (13: Permission denied) while connecting to upstream

This answer worked for me.

Back to Top