#>GNUNUX
#location = /roundcubemail {
#alias /usr/share/roundcubemail/;
location = / {
    alias %%nginx_root;
#<GNUNUX
}

#>GNUNUX
#location /roundcubemail/ {
#    root /usr/share;
location / {
    root %%nginx_root;
#<GNUNUX
    index index.php;

#>GNUNUX
#    location ~ ^/roundcubemail/bin/(.+)$ {
    location ~ ^/bin/(.+)$ {
#<GNUNUX
        deny all;
    }
    location ~ ^/plugins/enigma/home/(.+)$ {
        deny all;
    }

    # Define who can access the installer
    # keep this secured once configured

#>GNUNUX
#    location ~ ^/roundcubemail/installer/(.+\.php)$ {
    location ~ ^/installer/(.+\.php)$ {
#<GNUNUX
        allow 127.0.0.1;
        allow ::1;
        deny all;

        try_files $uri =404;
        fastcgi_intercept_errors on;
        include        fastcgi_params;
        fastcgi_param  SERVER_NAME      $host;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_pass   php-fpm;
    }

    # Define who can access the Webmail
    # You can enlarge permissions once configured

#>GNUNUX
#    location ~ ^/roundcubemail/(.+\.php)$ {
#    allow 127.0.0.1;
#    allow ::1;
#    deny all;
    location ~ ^/(.+\.php)$ {
#<GNUNUX

        try_files $uri =404;
        fastcgi_intercept_errors on;
        include        fastcgi_params;
        fastcgi_param  SERVER_NAME      $host;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_pass   php-fpm;
    }
}

#>GNUNUX
location /skins/elastic/risotto {
    alias /usr/local/lib/static/;
}
#<GNUNUX
