Files
floorithardwoodfloors.com/nginx.conf
T
Concept Agent 9907a2ab7d update
2026-05-07 11:45:16 +02:00

31 lines
784 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Flat HTML — serve /locations/buffalo as /locations/buffalo.html
location / {
try_files $uri $uri/ $uri.html =404;
}
# Cache static assets
location ~* \.(jpg|jpeg|png|webp|svg|ico|css|js|woff2?|mp4|webm)$ {
expires 30d;
add_header Cache-Control "public, immutable";
access_log off;
}
# Security headers
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
add_header Referrer-Policy "strict-origin-when-cross-origin";
# Gzip
gzip on;
gzip_types text/html text/css application/javascript image/svg+xml;
gzip_min_length 1024;
error_page 404 /index.html;
}