Permission Scheme and Nginx Try_files Directory

Discussion in 'General' started by HerveM, May 30, 2014.

  1. HerveM

    HerveM New Member


    I don't know if it related to ISPConfig Permission scheme or Nginx but I encountered this behavior :

    When you use Nginx directive like this :

    location / {
         try_files $uri $uri/ index.php;
    When you go to your website without a "/" or "index.php" you get a perm. error.
    Nginx try to test the Web Root folder and can't even if you have set an index.
    In log :
    I am using Debian 7 64b, Nginx 1.6.0, Php 5.5.18 and ISPConfig Patch 1. I have tested it with base package too.
    I was trying to install Owncloud 6.0.3.

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats a wrong error by nginx as it has all permisssions that it needs to access the site folder and the site is working. If it does not work, then thats not related to this message. nginx tries to get more permissions here then it should. We fixed the error already in the git stable brach by providing nginx more permissions and myking the sites less secure, but you can also just ignore this message es it does not indicate an error.
  3. HerveM

    HerveM New Member

    Nginx need read right to test if a folder exit. In fact it can test all folder in the webroot as it has execution right.

    Another weird things, you can't do a autoindex directly on web root folder. It give the same error.

    location / {
        autoindex on;
        autoindex_exact_size off;
        autoindex_localtime on;
    I will try to cheat with the Nginx vhost file.. Or will use acl.

    ---- Log
    My log :
    X.X.X.X - - [30/May/2014:23:09:10 +0200] "GET / HTTP/1.1" 404 793 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"
    2014/05/30 23:09:10 [crit] 28923#0: *106 open() "/var/www/" failed (13: Permission denied), client: X.X.X.X,, request: "GET / HTTP/1.1", host: ""
    2014/05/30 23:09:10 [crit] 28923#0: *106 open() "/var/www/" failed (13: Permission denied), client: X.X.X.X, server:, request: "GET / HTTP/1.1", host: ""
    --- Solution for Owncloud
    A tricky solution for installing Owncloud 6 with ISP3 :
    > Install Owncloud in a directory inside web folder.
    > Adapt your Nginx vhost config with the conf. used in OC6 manual.
    >> Set the root directory to /web/yourdirectorycreatedbefore/
    >> For stats, add a root statement who pointed the normal web directory.
    > Go to domain uri and install
    Last edited: May 31, 2014

Share This Page