Skip to content

Commit 82bdf8a

Browse files
Update web_system.tpl
1 parent 280a081 commit 82bdf8a

File tree

1 file changed

+11
-33
lines changed

1 file changed

+11
-33
lines changed

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

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,27 @@ server {
33
server_name %domain% %alias%;
44
root /var/lib/roundcube;
55
index index.php index.html index.htm;
6-
7-
8-
error_log /var/log/nginx/domains/%domain%.error.log;
9-
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;
108
119
include %home%/%user%/conf/mail/%root_domain%/nginx.forcessl.conf*;
12-
13-
location =/ {
14-
try_files $uri $uri/ /index.php?q=$uri&$args;
15-
}
16-
17-
location / {
18-
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)$ {
19-
expires 7d;
20-
fastcgi_hide_header "Set-Cookie";
21-
}
22-
}
23-
24-
location ~ /(config|temp|logs) {
25-
deny all;
26-
return 404;
27-
}
28-
10+
2911
location ~ /\.(?!well-known\/) {
3012
deny all;
3113
return 404;
3214
}
3315

34-
location ~ ^/(README.md|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
35-
deny all;
36-
return 404;
37-
}
38-
39-
location ~ ^/(bin|SQL)/ {
16+
location ~ ^/(README.md|config|temp|logs|bin|SQL|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
4017
deny all;
4118
return 404;
4219
}
4320

44-
location ~ /\. {
45-
return 404;
46-
deny all;
47-
access_log off;
48-
log_not_found off;
21+
location / {
22+
try_files $uri $uri/ /index.php?q=$uri&$args;
23+
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)$ {
24+
expires 7d;
25+
fastcgi_hide_header "Set-Cookie";
26+
}
4927
}
5028

5129
location ~ ^/(.*\.php)$ {
@@ -61,7 +39,7 @@ server {
6139
error_page 500 502 503 504 505 /error/50x.html;
6240

6341
location /error/ {
64-
alias /var/www/document_errors/;
42+
alias /var/www/document_errors/;
6543
}
6644

6745
include %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*;

0 commit comments

Comments
 (0)