sunline-drivers/nginx.conf
Ash 7d4ad2a8fe init: Sunline Drivers landing site
Site vitrine + module reservation pour service VTC haut de gamme Cote d'Azur.
Stack : Astro statique + nginx, deploye sur Coolify.

Sections : hero, 3 piliers, flotte (3 cards Mercedes), tarifs trajets signature,
mise a disposition, pourquoi nous, formulaire reservation (mailto), footer.

Design : Cote d'Azur Nocturne (Cormorant Garamond + Manrope, palette nuit
mediterranee + or champagne, ornements art deco).
2026-05-06 15:11:15 +02:00

57 lines
1.6 KiB
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Sécurité de base
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
server_tokens off;
# Compression
gzip on;
gzip_vary on;
gzip_min_length 256;
gzip_types text/plain text/css text/xml application/xml application/rss+xml application/javascript application/json image/svg+xml;
# Cache long pour assets immutables (Astro hash les fichiers)
location /_astro/ {
expires 1y;
add_header Cache-Control "public, immutable";
access_log off;
}
# Cache modéré pour images/fonts
location ~* \.(?:jpg|jpeg|gif|png|ico|svg|woff2?|ttf)$ {
expires 30d;
add_header Cache-Control "public";
access_log off;
}
# RSS
location = /rss.xml {
add_header Content-Type "application/rss+xml; charset=utf-8";
expires 10m;
}
# Sitemap
location = /sitemap-index.xml {
add_header Content-Type "application/xml; charset=utf-8";
expires 1d;
}
location = /sitemap-0.xml {
add_header Content-Type "application/xml; charset=utf-8";
expires 1d;
}
# SPA-style fallback (Astro génère des dossiers index.html, donc try_files suffit)
location / {
try_files $uri $uri/ $uri.html $uri/index.html =404;
}
# 404 propre
error_page 404 /404.html;
}