Browse Source

hestia-nginx move error_page statements to server block

Robert Zollner 6 years ago
parent
commit
11e57651f2
1 changed files with 4 additions and 5 deletions
  1. 4 5
      src/deb/nginx/nginx.conf

+ 4 - 5
src/deb/nginx/nginx.conf

@@ -85,11 +85,6 @@ http {
     add_header          X-Frame-Options SAMEORIGIN;
     add_header          X-Content-Type-Options nosniff;
 
-    error_page 403 /error/404.html;
-    error_page 404 /error/404.html;
-    error_page 410 /error/410.html;
-    error_page 500 501 502 503 504 505 /error/50x.html;
-
     # Vhost
     server {
         listen          8083 ssl;
@@ -98,6 +93,10 @@ http {
 
         # Fix error "The plain HTTP request was sent to HTTPS port"
         error_page 497 https://$host:$server_port$request_uri;
+        error_page 403 /error/404.html;
+        error_page 404 /error/404.html;
+        error_page 410 /error/410.html;
+        error_page 500 501 502 503 504 505 /error/50x.html;
 
         ssl_certificate      /usr/local/hestia/ssl/certificate.crt;
         ssl_certificate_key  /usr/local/hestia/ssl/certificate.key;