templates/default/roundcube.erb
server {
listen <%= @listen_port %>;
server_name <%= @server_name %>;
root <%= @base_dir %>;
index index.php index.html;
location ~ ^/favicon.ico$ {
root <%= @base_dir %>/web/skins/default/images;
log_not_found off;
access_log off;
expires max;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
deny all;
}
location ~ ^/(bin|SQL)/ {
deny all;
}
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~ ^(.+?\.php)(/.*)?$ {
try_files $1 =404;
include fastcgi_params;
fastcgi_pass <%= @fastcgi_pass %>;
fastcgi_param SCRIPT_FILENAME $document_root$1;
fastcgi_param PATH_INFO $2;
fastcgi_index index.php;
}
}