server { listen 80; root /usr/share/nginx/html; index index.html; # Health check location = /health { return 200 '{"status":"ok"}'; add_header Content-Type application/json; } # Static assets — cache aggressively location /static/ { expires 1h; add_header Cache-Control "public, immutable"; } # SPA fallback — all other paths serve index.html location / { try_files $uri $uri/ /index.html; add_header Cache-Control "no-cache"; } }