2026-07-10 03:52:49 +01:00
|
|
|
server {
|
2026-07-10 04:11:12 +01:00
|
|
|
listen 80;
|
|
|
|
|
listen [::]:80;
|
2026-07-10 03:52:49 +01:00
|
|
|
server_name _;
|
|
|
|
|
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html;
|
|
|
|
|
charset utf-8;
|
|
|
|
|
|
|
|
|
|
gzip_static on;
|
|
|
|
|
|
|
|
|
|
error_page 404 /404.html;
|
|
|
|
|
|
|
|
|
|
# hashed build assets: cache forever
|
|
|
|
|
location /_astro/ {
|
|
|
|
|
include /etc/nginx/snippets/security-headers.conf;
|
|
|
|
|
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
|
|
|
|
try_files $uri =404;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# everything else (HTML, sitemap, offline artifact): revalidate
|
|
|
|
|
location / {
|
|
|
|
|
include /etc/nginx/snippets/security-headers.conf;
|
|
|
|
|
add_header Cache-Control "no-cache" always;
|
|
|
|
|
try_files $uri $uri/ =404;
|
|
|
|
|
}
|
|
|
|
|
}
|