Nginx, django, gunicorn, ubuntu 14.04 (13: Permission denied) while connecting to upstream

前端 未结 2 1863
独厮守ぢ
独厮守ぢ 2021-01-13 15:29

I am working at my django project with nginx and gunicorn, as it said here:

https://www.digitalocean.com/community/tutorials/h

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-13 15:39

    proxy_pass http://unix:/root/myproject/myproject.sock;
    

    The socket is in the superuser's home folder. That's pretty much inaccessible to all other users including your nginx users. Please more the socket to a different location. /var/log/gunicorn/ is a good place.

    Also do i see you running gunicorn as root?. Not recommended.

    setuid root
    

    Please use some other user here.

提交回复
热议问题