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"; } }