From 3bacf8696a5f6da403c8a6efec629f488218d10a Mon Sep 17 00:00:00 2001 From: Jack Jamison Date: Wed, 6 Aug 2025 18:22:58 -0400 Subject: better 404 --- nginx/homepage.conf | 7 ++++++- zola-static/templates/index.html | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nginx/homepage.conf b/nginx/homepage.conf index 3bffb04..a9616c0 100644 --- a/nginx/homepage.conf +++ b/nginx/homepage.conf @@ -2,10 +2,15 @@ server { server_name jackjamison.net www.jackjamison.net ; + error_page 404 = /404.html; + location = /404.html { + internal; + root /var/www/homepage/404.html; + } + location / { root /var/www/homepage; index index.html; - error_page 404 404.html; } listen [::]:443 ssl ipv6only=on; # managed by Certbot diff --git a/zola-static/templates/index.html b/zola-static/templates/index.html index 3ae683e..98fe87f 100644 --- a/zola-static/templates/index.html +++ b/zola-static/templates/index.html @@ -11,6 +11,7 @@

Articles

-- cgit v1.2.3