From ddaf5ded8f239ca7ecec367f0ec3c99307852a7a Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 24 Apr 2020 10:42:12 -0400 Subject: [PATCH] add initial custom 404 page --- nginx/server.conf | 5 +++++ static/404.html | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 static/404.html diff --git a/nginx/server.conf b/nginx/server.conf index 48d4b306..776c5435 100644 --- a/nginx/server.conf +++ b/nginx/server.conf @@ -24,6 +24,7 @@ server { server_name grapheneos.org; root /var/www/html; + error_page 404 /404.html; charset utf-8; include /etc/nginx/snippets/security-headers.conf; @@ -65,6 +66,10 @@ server { default_type text/plain; } + location = /404.html { + internal; + } + location ~ "\.(ico|webmanifest)$" { include /etc/nginx/snippets/security-headers.conf; add_header Cache-Control "public, max-age=604800"; diff --git a/static/404.html b/static/404.html new file mode 100644 index 00000000..7b8d87ff --- /dev/null +++ b/static/404.html @@ -0,0 +1,55 @@ + + + + + Page not found | GrapheneOS + + + + + + + + + + + + + + + + + + + + + +
+

+ Page not found +

+

Page not found on the web server. If you think this is a mistake, please + report an issue.

+
+ + +