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

前端 未结 2 1834
独厮守ぢ
独厮守ぢ 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.

    0 讨论(0)
  • 2021-01-13 15:45

    I think you have some other process using port 80, according to your nginx error log.

    You'll have to figure out what that process is, and kill it if unneeded. Or use another port.

    0 讨论(0)
提交回复
热议问题