2026-06-04 19:09:31 +03:30
|
|
|
server {
|
|
|
|
|
listen 80;
|
|
|
|
|
server_name _;
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html;
|
|
|
|
|
|
|
|
|
|
# Static Next.js export: serve the file, its .html twin, or fall back to the
|
|
|
|
|
# SPA shell (the app uses client-side hash routing).
|
|
|
|
|
location / {
|
|
|
|
|
try_files $uri $uri.html $uri/ /index.html;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-07 08:04:14 +03:30
|
|
|
# Never cache the HTML shell — so a new deploy (with new chunk hashes) is
|
|
|
|
|
# always picked up immediately and tabs don't load a stale bundle.
|
|
|
|
|
location ~* \.html$ {
|
|
|
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
|
|
|
try_files $uri /index.html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Long-cache immutable, content-hashed build assets.
|
2026-06-04 19:09:31 +03:30
|
|
|
location /_next/static/ {
|
|
|
|
|
expires 1y;
|
|
|
|
|
add_header Cache-Control "public, immutable";
|
|
|
|
|
}
|
|
|
|
|
}
|