Nginx: stat() failed (13: permission denied)

后端 未结 16 1848
梦谈多话
梦谈多话 2020-12-04 05:04

I am using the default config while adding the specific directory with nginx installed on my ubuntu 12.04 machine.

server {
        #listen   80; ## listen          


        
16条回答
  •  既然无缘
    2020-12-04 05:42

    I had the same issue, I am using Plesk Onyx 17 with Centos7. I could see this error in proxy_error_log under the affected domain's logs. All the dirs/files in /var/www/vhosts/ are owned by respective users (domain owners) and you can see that all of them are in psacln group. So solution was to add nginx also to this group, so he can see what he needs:

    usermod -aG psacln nginx
    

    And indeed, restart nginx and reload page with Ctrl+F5.

提交回复
热议问题