Mirror of https://forge.levinkeller.de/levin/dorfarchiv.git
153e29ff47372717ae50357fb96b7db879718549
31 lines · 852 B
| 1 | server { |
| 2 | listen 8080; |
| 3 | listen [::]:8080; |
| 4 | server_name _; |
| 5 | |
| 6 | root /usr/share/nginx/html; |
| 7 | index index.html; |
| 8 | |
| 9 | # Hinter Traefik: relative Redirects, damit Verzeichnis-Slash-Redirects nicht |
| 10 | # den internen Port 8080 / http durchsickern lassen. |
| 11 | absolute_redirect off; |
| 12 | port_in_redirect off; |
| 13 | |
| 14 | # Docusaurus erzeugt /pfad/index.html — sauberes URL-Routing inkl. Slash-Varianten. |
| 15 | location / { |
| 16 | try_files $uri $uri/ $uri.html /index.html; |
| 17 | } |
| 18 | |
| 19 | # Gehashte Assets aggressiv cachen (Docusaurus legt sie unter /assets/ ab) |
| 20 | location /assets/ { |
| 21 | expires 1y; |
| 22 | add_header Cache-Control "public, immutable"; |
| 23 | access_log off; |
| 24 | } |
| 25 | |
| 26 | error_page 404 /404.html; |
| 27 | |
| 28 | gzip on; |
| 29 | gzip_types text/plain text/css application/javascript application/json image/svg+xml; |
| 30 | gzip_min_length 1024; |
| 31 | } |