Add 50x error page

This commit is contained in:
Fred Boniface 2023-10-02 21:26:05 +01:00
parent c3d55449a0
commit 6ea8f841e1
2 changed files with 27 additions and 9 deletions

View File

@ -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$) {

View File

@ -0,0 +1,23 @@
<script lang="ts">
import Header from "$lib/navigation/header.svelte";
import Nav from "$lib/navigation/nav.svelte";
const title = "50x - Server Error"
</script>
<Header {title} />
<h1 class="heading">This page has been delayed by more servers than usual needing repairs at the same time</h1>
<p>There was an error with the server, please try again later</p>
<p>Use the menu bar to try another destination, you can report an issue from the 'Menu'</p>
<br>
<p class="err_code">Status: 50x<br>Message: INTERNAL_SERVER_ERROR</p>
<Nav />
<style>
.heading {
color: var(--second-text-color);
}
.err_code {
color: white;
}
</style>