server { listen 8080; server_name _; root /usr/share/nginx/html; index index.html; # Static assets location /assets/ { try_files $uri =404; access_log off; expires 30d; add_header Cache-Control "public, max-age=2592000, immutable"; } # Single-page app fallback location / { try_files $uri $uri/ /index.html; } }