nvj-turnierplaner2/nginx.conf
2026-01-07 23:42:36 +01:00

29 lines
699 B
Nginx Configuration File

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Gzip Kompression für bessere Performance
gzip on;
gzip_types text/css application/javascript application/json;
gzip_min_length 1000;
location / {
try_files $uri $uri/ /index.html;
}
# Cache-Control Header für statische Assets
location ~* \.(js|css)$ {
expires 1d;
add_header Cache-Control "public, immutable";
}
# Keine Cache für HTML-Dateien
location ~* \.(html)$ {
expires -1;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
}
}