Files

31 lines
709 B
Nginx Configuration File
Raw Permalink Normal View History

server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
# SPA routing: every unknown path falls back to index.html.
location / {
try_files $uri $uri/ /index.html;
}
# Long-cache hashed asset bundles emitted by Vite under /assets/.
location /assets/ {
access_log off;
expires 1y;
add_header Cache-Control "public, immutable";
}
# Health endpoint scraped by Caddy / Prometheus blackbox.
location = /healthz {
access_log off;
default_type text/plain;
return 200 "ok\n";
}
# No directory listing, no server tokens.
autoindex off;
server_tokens off;
}