Why does Nginx return a 403 even though all permissions are set properly?

前端 未结 15 2529
逝去的感伤
逝去的感伤 2020-12-12 09:54

I have Nginx setup and displaying the test page properly. If I try to change the root path, I get a 403 Forbidden error, even though all permissions are identical. Additiona

15条回答
  •  生来不讨喜
    2020-12-12 10:26

    I ran into the same problem:

    • Checked nginx.conf to verify the user
    • Permissions were set properly
    • Made sure "x" right was set for the entire path

    Did a restart from the command line (I'd been using Webmin all this time) and noticed this error:

     aed@aed:/var/www/test.local$ sudo service nginx restart
     * Restarting nginx nginx 
    nginx: [warn] conflicting server name "test.local" on 0.0.0.0:80, ignored
    nginx: [warn] conflicting server name "test.local" on 0.0.0.0:80, ignored
    

    Apparently there was a duplicate definition and thus my attempt to access "test.local" failed.

提交回复
热议问题