server { listen 8080; server_name localhost; # Erzwingt relative Redirects (z.B. Location: /templates/ statt http://...:8080/templates/) absolute_redirect off; port_in_redirect off; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ =404; } error_page 404 /404.html; location = /404.html { root /usr/share/nginx/html; internal; } }