Skip to content

Commit 4169fcb

Browse files
author
Kristan Kenney
committed
Update NGINX webmail template
1 parent 28c08d3 commit 4169fcb

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

install/deb/templates/mail/nginx/default.stpl

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ server {
66
error_log /var/log/%web_system%/domains/%domain%.error.log error;
77

88
location / {
9-
proxy_pass https://%ip%:%web_ssl_port%;
10-
location ~* ^.+\.(%proxy_extentions%)$ {
11-
root %sdocroot%;
12-
access_log /var/log/%web_system%/domains/%domain%.log combined;
13-
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
14-
expires max;
9+
proxy_pass http://%ip%:%web_port%;
10+
location ~* ^.+\.(jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm)$ {
11+
alias /var/lib/roundcube/;
12+
expires 15m;
1513
try_files $uri @fallback;
1614
}
1715
}
@@ -20,8 +18,20 @@ server {
2018
alias %home%/%user%/web/%root_domain%/document_errors/;
2119
}
2220

21+
location ~ /(config|temp|logs) {
22+
return 404;
23+
}
24+
25+
location ~ ^/(.*\.php)$ {
26+
alias /var/lib/roundcube/$1;
27+
fastcgi_pass 127.0.0.1:9000;
28+
fastcgi_index index.php;
29+
include fastcgi_params;
30+
fastcgi_param SCRIPT_FILENAME $request_filename;
31+
}
32+
2333
location @fallback {
24-
proxy_pass https://%ip%:%web_ssl_port%;
34+
proxy_pass http://%ip%:%web_port%;
2535
}
2636

2737
location ~ /\.ht {return 404;}

0 commit comments

Comments
 (0)