Report this

What is the reason for this report?

How To Serve Flask Applications with Gunicorn and Nginx on Ubuntu 20.04

Posted on February 21, 2021

Connected Tutorial(This question is a follow-up to this tutorial):

How To Serve Flask Applications with Gunicorn and Nginx on Ubuntu 20.04

Hi,

Followed the tutorial on Flask/Gunicorn/Nginx/Ubuntu20.04 and am having a problem at the point where Nginx connects to the myproject.socket file. Client request results in an error in /var/log/nginx/error that reports ‘Permission denied’:

*3 connect() to unix:/home/user/myproject/myproject.sock failed (13: Permission denied) while connecting to upstream, client: …, server: … , request: “GET / HTTP/1.1”, upstream: “http://unix:/home/user/myproject/myproject.sock:/”, host: “…”

Have tried 777 permissions on the socket file and changes to the permission on the parent dir with no success. Any ideas? Could it be an issue with the www-data user’s memberships?

DC

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.