server { listen 8080; listen [::]:8080; server_name _; root /usr/share/nginx/html; index index.html; # Hinter Traefik: relative Redirects, damit Verzeichnis-Slash-Redirects nicht # den internen Port 8080 / http durchsickern lassen. absolute_redirect off; port_in_redirect off; # Docusaurus erzeugt /pfad/index.html — sauberes URL-Routing inkl. Slash-Varianten. location / { try_files $uri $uri/ $uri.html /index.html; } # Gehashte Assets aggressiv cachen (Docusaurus legt sie unter /assets/ ab) location /assets/ { expires 1y; add_header Cache-Control "public, immutable"; access_log off; } error_page 404 /404.html; gzip on; gzip_types text/plain text/css application/javascript application/json image/svg+xml; gzip_min_length 1024; }