--- apiVersion: v1 kind: ConfigMap metadata: name: nginx-config namespace: minecraft data: nginx.conf: | user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; server { listen 80; # Custom 502 error page with auto-refresh error_page 502 /502.html; location = /502.html { internal; return 200 '
Please wait a moment and try refreshing the page.
'; add_header Content-Type text/html; } # Main location - proxy to Minecraft Dynmap location / { # Proxy configuration for Dynmap server proxy_pass http://localhost:8123; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Inject user authentication meta tag into HTML head sub_filter '' ''; # Replace default Dynmap title with custom server name sub_filter 'Minecraft Dynamic Map' "Hexor's MC server"; # Inject main JavaScript functions before closing body tag sub_filter "" ''; # Add server information panel sub_filter '