nginx rewrite works but throws errors

Discussion in 'Installation/Configuration' started by bax, Apr 16, 2014.

  1. bax

    bax Member

    Hi!

    I'm using a rewrite on NGINX which is working perfectly. All requests are being redirected to index.php and the script uses the $_SERVER['REQUEST_URI']

    However, whenever someone opens www.XXXYYY.com I have an error in my log. The error does not appear when one opens one of the lower pages (www.XXXYYY.com/xyz).

    This is the error:
    Code:
    [crit] 12661#0: *14 open() "/var/www/XXXYYY.com/web/" failed (13: Permission denied), client: XX.XX.XX.XX, server: XXXYYY.com, request: "GET / HTTP/1.1", host: "www.XXXYYY.com"
    My php.ini directives:

    Code:
    error_reporting = E_ALL
    display_errors = On 
    display_startup_errors = On
    My nginx directives:

    Code:
    location / {
        try_files $uri $uri/ /index.php;
    }
    All the permissions look fine to me…
     
  2. bax

    bax Member

    I just realized that I have those error-logs on all of my (sub)domains.

    All are stating "Permission denied" when I go directly to the root folder of the domain (like ZZZ.XXXYYY.com/).
     

Share This Page