f38d059
location = /roundcubemail {
f38d059
    alias /usr/share/roundcubemail/;
f38d059
}
f38d059
f38d059
location /roundcubemail/ {
f38d059
    root /usr/share;
f38d059
    index index.php;
f38d059
f38d059
    location ~ ^/roundcubemail/bin/(.+)$ {
f38d059
        deny all;
f38d059
    }
f38d059
    location ~ ^/roundcubemail/plugins/enigma/home/(.+)$ {
f38d059
        deny all;
f38d059
    }
f38d059
f38d059
    # Define who can access the installer
f38d059
    # keep this secured once configured
f38d059
f38d059
    location ~ ^/roundcubemail/installer/(.+\.php)$ {
f38d059
        allow 127.0.0.1;
f38d059
        allow ::1;
f38d059
        deny all;
f38d059
f38d059
        try_files $uri =404;
f38d059
        fastcgi_intercept_errors on;
f38d059
        include        fastcgi_params;
f38d059
        fastcgi_param  SERVER_NAME      $host;
f38d059
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
f38d059
        fastcgi_pass   php-fpm;
f38d059
    }
f38d059
f38d059
    # Define who can access the Webmail
f38d059
    # You can enlarge permissions once configured
f38d059
f38d059
    location ~ ^/roundcubemail/(.+\.php)$ {
f38d059
        allow 127.0.0.1;
f38d059
        allow ::1;
f38d059
        deny all;
f38d059
f38d059
        try_files $uri =404;
f38d059
        fastcgi_intercept_errors on;
f38d059
        include        fastcgi_params;
f38d059
        fastcgi_param  SERVER_NAME      $host;
f38d059
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
f38d059
        fastcgi_pass   php-fpm;
f38d059
    }
f38d059
}