Skip to content

Commit 4473219

Browse files
Update default.tpl
1 parent 14fc14e commit 4473219

File tree

1 file changed

+17
-35
lines changed

1 file changed

+17
-35
lines changed

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

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,29 @@ server {
33
server_name %domain% %alias%;
44
root /var/lib/roundcube;
55
index index.php index.html index.htm;
6-
7-
error_log /var/log/nginx/domains/%domain%.error.log;
8-
access_log /var/log/nginx/domains/%domain%.access.log;
6+
access_log /var/log/nginx/domains/%domain%.log combined;
7+
error_log /var/log/nginx/domains/%domain%.error.log error;
98
109
include %home%/%user%/conf/mail/%root_domain%/nginx.forcessl.conf*;
1110
12-
location / {
13-
proxy_pass http://%ip%:%web_port%;
14-
try_files $uri $uri/ /index.php?q=$uri&$args;
15-
alias /var/lib/roundcube/;
16-
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)$ {
17-
expires 7d;
18-
fastcgi_hide_header "Set-Cookie";
19-
}
20-
}
21-
22-
location ~ /(config|temp|logs) {
23-
deny all;
24-
return 404;
25-
}
26-
2711
location ~ /\.(?!well-known\/) {
2812
deny all;
2913
return 404;
3014
}
3115

32-
location ~ ^/(README.md|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
16+
location ~ ^/(README.md|config|temp|logs|bin|SQL|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
3317
deny all;
3418
return 404;
3519
}
3620

37-
location ~ ^/(bin|SQL)/ {
38-
deny all;
39-
return 404;
40-
}
41-
42-
location ~ /\. {
43-
return 404;
44-
deny all;
45-
access_log off;
46-
log_not_found off;
21+
location / {
22+
proxy_pass http://%ip%:%web_port%;
23+
try_files $uri $uri/ /index.php?q=$uri&$args;
24+
alias /var/lib/roundcube/;
25+
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)$ {
26+
expires 7d;
27+
fastcgi_hide_header "Set-Cookie";
28+
}
4729
}
4830

4931
location ~ ^/(.*\.php)$ {
@@ -53,17 +35,17 @@ server {
5335
include fastcgi_params;
5436
fastcgi_param SCRIPT_FILENAME $request_filename;
5537
}
56-
38+
39+
location @fallback {
40+
proxy_pass http://%ip%:%web_port%;
41+
}
42+
5743
error_page 403 /error/404.html;
5844
error_page 404 /error/404.html;
5945
error_page 500 502 503 504 505 /error/50x.html;
6046

6147
location /error/ {
62-
alias /var/www/document_errors/;
63-
}
64-
65-
location @fallback {
66-
proxy_pass http://%ip%:%web_port%;
48+
alias /var/www/document_errors/;
6749
}
6850

6951
include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.conf_*;

0 commit comments

Comments
 (0)