diff --git a/build/config/errorpages.conf b/build/config/errorpages.conf new file mode 100644 index 0000000..707bfd8 --- /dev/null +++ b/build/config/errorpages.conf @@ -0,0 +1,10 @@ +# error pages +error_page 400 /errorpages/400.html; +error_page 401 /errorpages/401.html; +error_page 403 /errorpages/403.html; +error_page 404 /errorpages/404.html; +error_page 500 502 503 504 /errorpages/50x.html; + +location ^~ /errorpages { + root /usr/share/nginx/html; +} diff --git a/build/config/nginx.conf b/build/config/nginx.conf index b64208e..49b27f4 100644 --- a/build/config/nginx.conf +++ b/build/config/nginx.conf @@ -44,6 +44,9 @@ http { resolver 1.1.1.1; include /etc/nginx/config/*.conf; + # set default 'fun' error pages + include /etc/nginx/errorpages.conf; + # include enabled server blocks from sites/*.conf include /etc/nginx/sites/*.conf; }