Files
bcs-website/deploy/nginx.conf
T
bmr_bluecap d1c1726796
CI / ci (push) Failing after 1m50s
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.
2026-10-23 11:36:00 -04:00

27 lines
585 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Cache-Control "public, max-age=300";
location = /healthz {
access_log off;
try_files /healthz =200;
}
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
location ~* \.(?:css|js|jpg|jpeg|png|webp|svg|ico|woff2)$ {
try_files $uri =404;
add_header Cache-Control "public, max-age=31536000, immutable";
}
}