From 6ea8f841e1b9280ded48a244627cb64a726b68fd Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Mon, 2 Oct 2023 21:26:05 +0100 Subject: [PATCH] Add 50x error page --- nginx.conf | 13 ++++--------- src/routes/err/50x/+page.svelte | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 src/routes/err/50x/+page.svelte diff --git a/nginx.conf b/nginx.conf index cc4e535..ac69bcc 100644 --- a/nginx.conf +++ b/nginx.conf @@ -42,19 +42,14 @@ http { add_header Content-Security-Policy "default-src 'self'"; - error_page 404 /404.html - - location /404.html { - root /err/; - } - location / { root /usr/share/nginx/html; - index index.html; + index index; gzip_static on; brotli_static on; - error_page 500 502 503 504 /50x.html; - try_files $uri.html $uri $uri/ =404; + error_page 500 502 503 504 /err/50x.html; + error_page 404 /err/404; + try_files $uri.html $uri $uri/index.html $uri/ =404; add_header Cache-Control "public, no-transform, max-age=1209600"; if ($uri ~* \.html$) { diff --git a/src/routes/err/50x/+page.svelte b/src/routes/err/50x/+page.svelte new file mode 100644 index 0000000..a0b85f4 --- /dev/null +++ b/src/routes/err/50x/+page.svelte @@ -0,0 +1,23 @@ + + +
+

This page has been delayed by more servers than usual needing repairs at the same time

+

There was an error with the server, please try again later

+

Use the menu bar to try another destination, you can report an issue from the 'Menu'

+
+

Status: 50x
Message: INTERNAL_SERVER_ERROR

+