Browse Source

Update error page directives

Kristan Kenney 6 years ago
parent
commit
895b19cc38

+ 8 - 7
install/deb/templates/mail/nginx/default.stpl

@@ -47,16 +47,17 @@ server {
         fastcgi_param HTTPS on;
     }
     
-    location @fallback {
-        proxy_pass http://%ip%:%web_port%;
-    }
-
     error_page 403 /error/404.html;
     error_page 404 /error/404.html;
-    error_page 500 502 503 504 /error/50x.html;
-
+    error_page 500 502 503 504 505 /error/50x.html;
+    
     location /error/ {
-        alias   /var/www/document_errors/;
+        alias       /var/www/document_errors/;
+        try_files   $uri $uri/;
+    }
+
+    location @fallback {
+        proxy_pass http://%ip%:%web_port%;
     }
 
     include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.conf_*;

+ 7 - 6
install/deb/templates/mail/nginx/default.tpl

@@ -46,16 +46,17 @@ server {
         fastcgi_param SCRIPT_FILENAME $request_filename;
     }
     
-    location @fallback {
-        proxy_pass http://%ip%:%web_port%;
-    }
-
     error_page 403 /error/404.html;
     error_page 404 /error/404.html;
-    error_page 500 502 503 504 /error/50x.html;
+    error_page 500 502 503 504 505 /error/50x.html;
 
     location /error/ {
-        alias   /var/www/document_errors/;
+        alias       /var/www/document_errors/;
+        try_files   $uri $uri/;
+    }
+
+    location @fallback {
+        proxy_pass http://%ip%:%web_port%;
     }
 
     include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.conf_*;

+ 3 - 2
install/deb/templates/mail/nginx/web_system.stpl

@@ -51,10 +51,11 @@ server {
     
     error_page 403 /error/404.html;
     error_page 404 /error/404.html;
-    error_page 500 502 503 504 /error/50x.html;
+    error_page 500 502 503 504 505 /error/50x.html;
 
     location /error/ {
-        alias   /var/www/document_errors/;
+        alias       /var/www/document_errors/;
+        try_files   $uri $uri/;
     }
 
     include %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*;

+ 3 - 2
install/deb/templates/mail/nginx/web_system.tpl

@@ -50,10 +50,11 @@ server {
     
     error_page 403 /error/404.html;
     error_page 404 /error/404.html;
-    error_page 500 502 503 504 /error/50x.html;
+    error_page 500 502 503 504 505 /error/50x.html;
 
     location /error/ {
-        alias   /var/www/document_errors/;
+        alias       /var/www/document_errors/;
+        try_files   $uri $uri/;
     }
 
     include %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*;