|
|
@@ -3,23 +3,26 @@ server {
|
|
|
server_name %domain% %alias%;
|
|
|
ssl_certificate %ssl_pem%;
|
|
|
ssl_certificate_key %ssl_key%;
|
|
|
- error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
|
|
-
|
|
|
- location / {
|
|
|
- proxy_pass http://%ip%:%web_port%;
|
|
|
- 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)$ {
|
|
|
- alias /var/lib/roundcube/;
|
|
|
- expires 15m;
|
|
|
- try_files $uri @fallback;
|
|
|
- }
|
|
|
+ root /var/lib/roundcube;
|
|
|
+ index index.php;
|
|
|
+
|
|
|
+ location ~ /(config|temp|logs) {
|
|
|
+ deny all
|
|
|
+ return 404;
|
|
|
}
|
|
|
-
|
|
|
- location /error/ {
|
|
|
- alias %home%/%user%/web/%root_domain%/document_errors/;
|
|
|
+
|
|
|
+ location ~ /\.(?!well-known\/) {
|
|
|
+ deny all;
|
|
|
+ return 404;
|
|
|
}
|
|
|
|
|
|
- location ~ /(config|temp|logs) {
|
|
|
- return 404;
|
|
|
+ location / {
|
|
|
+ proxy_pass http://%ip%:%web_port%;
|
|
|
+ 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)$ {
|
|
|
+ alias /var/lib/roundcube/;
|
|
|
+ expires 1h;
|
|
|
+ try_files $uri @fallback;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
location ~ ^/(.*\.php)$ {
|
|
|
@@ -31,15 +34,16 @@ server {
|
|
|
}
|
|
|
|
|
|
location @fallback {
|
|
|
- proxy_pass http://%ip%:%web_port%;
|
|
|
+ proxy_pass http://%ip%:%web_port%;
|
|
|
}
|
|
|
|
|
|
- location ~ /\.ht {return 404;}
|
|
|
- location ~ /\.svn/ {return 404;}
|
|
|
- location ~ /\.git/ {return 404;}
|
|
|
- location ~ /\.hg/ {return 404;}
|
|
|
- location ~ /\.bzr/ {return 404;}
|
|
|
+ error_page 403 /error/404.html;
|
|
|
+ error_page 404 /error/404.html;
|
|
|
+ error_page 500 502 503 504 /error/50x.html;
|
|
|
+
|
|
|
+ location /error/ {
|
|
|
+ alias %home%/%user%/web/%root_domain%/document_errors/;
|
|
|
+ }
|
|
|
|
|
|
- include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.ssl.conf_*;
|
|
|
+ include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.conf_*;
|
|
|
}
|
|
|
-
|