File tree Expand file tree Collapse file tree 4 files changed +42
-9
lines changed
install/deb/templates/mail/nginx Expand file tree Collapse file tree 4 files changed +42
-9
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,16 @@ server {
55 ssl_certificate_key %ssl_key%;
66 root /var/lib/roundcube;
77 index index.php index.html index.htm;
8-
8+
9+ error_log /var/log/nginx/domains/%domain%.error.log;
10+ access_log /var/log/nginx/domains/%domain%.access.log;
11+
912 location / {
1013 proxy_pass http://%ip%:%web_port%;
1114 try_files $uri $uri/ /index.php?q=$uri&$args;
1215 alias /var/lib/roundcube/;
1316 location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
14- expires 1h ;
17+ expires 7d ;
1518 fastcgi_hide_header "Set-Cookie";
1619 }
1720 }
@@ -31,6 +34,11 @@ server {
3134 return 404;
3235 }
3336
37+ location ~ ^/(bin|SQL)/ {
38+ deny all;
39+ return 404;
40+ }
41+
3442 location ~ /\. {
3543 return 404;
3644 deny all;
@@ -52,7 +60,7 @@ server {
5260 error_page 500 502 503 504 505 /error/50x.html;
5361
5462 location /error/ {
55- alias /var/www/document_errors/;
63+ root /var/www/document_errors/;
5664 try_files $uri $uri/;
5765 }
5866
Original file line number Diff line number Diff line change @@ -4,14 +4,17 @@ server {
44 root /var/lib/roundcube;
55 index index.php index.html index.htm;
66
7+ error_log /var/log/nginx/domains/% domain% .error.log;
8+ access_log /var/log/nginx/domains/% domain% .access.log;
9+
710 include % home% /% user% /conf/mail/% root_domain% /nginx.forcessl.conf*;
811
912 location / {
1013 proxy_pass http://% ip% :% web_port% ;
1114 try_files $uri $uri / /index.php?q= $uri &$args ;
1215 alias /var/lib/roundcube/;
1316 location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
14- expires 1h ;
17+ expires 7d ;
1518 fastcgi_hide_header " Set-Cookie" ;
1619 }
1720 }
@@ -31,6 +34,11 @@ server {
3134 return 404;
3235 }
3336
37+ location ~ ^/(bin|SQL)/ {
38+ deny all;
39+ return 404;
40+ }
41+
3442 location ~ /\. {
3543 return 404;
3644 deny all;
@@ -51,7 +59,7 @@ server {
5159 error_page 500 502 503 504 505 /error/50x.html;
5260
5361 location /error/ {
54- alias /var/www/document_errors/;
62+ root /var/www/document_errors/;
5563 try_files $uri $uri /;
5664 }
5765
Original file line number Diff line number Diff line change @@ -6,13 +6,16 @@ server {
66 root /var/lib/roundcube;
77 index index.php index.html index.htm;
88
9+ error_log /var/log/nginx/domains/%domain%.error.log;
10+ access_log /var/log/nginx/domains/%domain%.access.log;
11+
912 location =/ {
1013 try_files $uri $uri/ /index.php?q=$uri&$args;
1114 }
1215
1316 location / {
1417 location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
15- expires 1h ;
18+ expires 7d ;
1619 fastcgi_hide_header "Set-Cookie";
1720 }
1821 }
@@ -32,6 +35,11 @@ server {
3235 return 404;
3336 }
3437
38+ location ~ ^/(bin|SQL)/ {
39+ deny all;
40+ return 404;
41+ }
42+
3543 location ~ /\. {
3644 return 404;
3745 deny all;
@@ -53,7 +61,7 @@ server {
5361 error_page 500 502 503 504 505 /error/50x.html;
5462
5563 location /error/ {
56- alias /var/www/document_errors/;
64+ root /var/www/document_errors/;
5765 try_files $uri $uri/;
5866 }
5967
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ server {
44 root /var/lib/roundcube;
55 index index.php index.html index.htm;
66
7+
8+ error_log /var/log/nginx/domains/% domain% .error.log;
9+ access_log /var/log/nginx/domains/% domain% .access.log;
10+
711 include % home% /% user% /conf/mail/% root_domain% /nginx.forcessl.conf*;
812
913 location =/ {
@@ -12,7 +16,7 @@ server {
1216
1317 location / {
1418 location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
15- expires 1h ;
19+ expires 7d ;
1620 fastcgi_hide_header " Set-Cookie" ;
1721 }
1822 }
@@ -32,6 +36,11 @@ server {
3236 return 404;
3337 }
3438
39+ location ~ ^/(bin|SQL)/ {
40+ deny all;
41+ return 404;
42+ }
43+
3544 location ~ /\. {
3645 return 404;
3746 deny all;
@@ -52,7 +61,7 @@ server {
5261 error_page 500 502 503 504 505 /error/50x.html;
5362
5463 location /error/ {
55- alias /var/www/document_errors/;
64+ root /var/www/document_errors/;
5665 try_files $uri $uri /;
5766 }
5867
You can’t perform that action at this time.
0 commit comments