server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; gzip on; gzip_types text/plain text/css application/javascript application/json image/svg+xml; gzip_min_length 1024; gzip_vary on; # Relative Location headers: TLS ends at Zoraxy, so an absolute redirect # built here would point at http://. absolute_redirect off; # Pages folded into the homepage (see App.tsx for the same list client-side). location = /features { return 301 /#included; } location = /drivers { return 301 /#hardware; } location = /roadmap { return 301 /; } location = /docs/architecture { return 301 /; } # SPA fallback — all routes resolve to index.html location / { try_files $uri $uri/ /index.html; } # Immutable cache for hashed assets (Vite adds content hashes) location ~* \.(js|css|woff2?)$ { expires 1y; add_header Cache-Control "public, immutable"; } location ~* \.(png|jpg|jpeg|gif|svg|ico|webp)$ { expires 30d; add_header Cache-Control "public"; } }