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:
1 parent
e85edbfe34
commit
d1c1726796
1 file changed
+2
-2
+2
-2
@@ -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;
|
||||||
|
|||||||
Reference in new issue
Block a user