fix(nginx): return a real 404 instead of a 500 redirect loop
CI / ci (push) Failing after 1m50s

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.
This commit is contained in:
bmr_bluecap committed 2026-10-23 11:36:00 -04:00
1 parent e85edbfe34
commit d1c1726796
1 file changed
+2 -2
+2 -2
View File
@@ -14,10 +14,10 @@ server {
} }
location / { 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)$ { location ~* \.(?:css|js|jpg|jpeg|png|webp|svg|ico|woff2)$ {
try_files $uri =404; try_files $uri =404;