From d1c172679656bb1b487d96564c498ff09c9327cd Mon Sep 17 00:00:00 2001 From: Brad Rodgers Date: Fri, 23 Oct 2026 11:36:00 -0400 Subject: [PATCH] fix(nginx): return a real 404 instead of a 500 redirect loop The 404 fallback pointed at /404/index.html, but Astro emits 404.html, so every unknown URL looped internally and nginx answered 500. The try_files fallback also served the error page with a 200 status. Fall through to =404 and point error_page at /404.html. --- deploy/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/nginx.conf b/deploy/nginx.conf index 5e44b68..3d92e38 100644 --- a/deploy/nginx.conf +++ b/deploy/nginx.conf @@ -14,10 +14,10 @@ server { } location / { - try_files $uri $uri/ /404/index.html; + try_files $uri $uri/ =404; } - error_page 404 /404/index.html; + error_page 404 /404.html; location ~* \.(?:css|js|jpg|jpeg|png|webp|svg|ico|woff2)$ { try_files $uri =404;