server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; # index — всегда свежий, чтобы правки доезжали сразу location = /index.html { add_header Cache-Control "no-cache"; } # статика с длинным кэшем location ~* \.(webp|png|jpg|jpeg|svg|css|js|woff2)$ { expires 7d; add_header Cache-Control "public, max-age=604800"; } location / { try_files $uri $uri/ /index.html; } }