Permission denied - nginx and uwsgi socket

前端 未结 9 1817
暗喜
暗喜 2020-12-07 17:44

Well I am currently trying to get my django application served using nginx and uwsgi. I am currently using a virtual environment to which uwsgi is installed. However I am cu

9条回答
  •  无人及你
    2020-12-07 17:58

    Another great article for CentOS users:

    https://axilleas.me/en/blog/2013/selinux-policy-for-nginx-and-gitlab-unix-socket-in-fedora-19/

    Although answers are useful regarding CentOS the problem lies beneath SELinux.

    I followed the entire article but what solved the issue I believed where the following commands:

    yum install -y policycoreutils-{python,devel}
    grep nginx /var/log/audit/audit.log | audit2allow -M nginx
    semodule -i nginx.pp
    usermod -a -G user nginx
    chmod g+rx /home/user/
    

    Please substitute user with your actual user for granting permissions. Same applies for the directory under chmod command.

提交回复
热议问题