server { listen 8082; server_name _; root /usr/share/nginx/html; # Hashed build assets can be cached forever. location /assets/ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; } # Single page app: always serve index.html. location / { add_header Cache-Control "no-cache"; try_files $uri /index.html; } }