move error pages back to server configs

This commit is contained in:
Asif Bacchus 2019-10-17 01:23:11 -06:00
parent 938ae8d83d
commit f25d9ae3de
4 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,3 @@
# error pages
error_page 400 /errorpages/400.html; error_page 400 /errorpages/400.html;
error_page 401 /errorpages/401.html; error_page 401 /errorpages/401.html;
error_page 403 /errorpages/403.html; error_page 403 /errorpages/403.html;

View File

@ -44,9 +44,6 @@ http {
resolver 1.1.1.1; resolver 1.1.1.1;
include /etc/nginx/config/*.conf; include /etc/nginx/config/*.conf;
# set default 'fun' error pages
include /etc/nginx/errorpages.conf;
# include enabled server blocks from sites/*.conf # include enabled server blocks from sites/*.conf
include /etc/nginx/sites/*.conf; include /etc/nginx/sites/*.conf;
} }

View File

@ -7,4 +7,7 @@ server {
location / { location / {
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
} }
# error pages
include /etc/nginx/errorpages.conf;
} }

View File

@ -20,6 +20,10 @@ server {
autoindex on; autoindex on;
} }
# error pages
include /etc/nginx/errorpages.conf;
}
server { server {
listen 443 ssl https2; listen 443 ssl https2;
include /etc/nginx/server_names.conf; include /etc/nginx/server_names.conf;
@ -30,4 +34,7 @@ server {
location / { location / {
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
} }
# error pages
include /etc/nginx/errorpages.conf;
} }