From 77371cd64042afe005cc7e85f03321015103081e Mon Sep 17 00:00:00 2001 From: ab Date: Wed, 9 Jul 2025 13:16:41 +0000 Subject: [PATCH] Update k8s/games/minecraft/deployments.yaml --- k8s/games/minecraft/deployments.yaml | 126 +++++++++++++++++++++++++-- 1 file changed, 120 insertions(+), 6 deletions(-) diff --git a/k8s/games/minecraft/deployments.yaml b/k8s/games/minecraft/deployments.yaml index 81a1425..89c3183 100644 --- a/k8s/games/minecraft/deployments.yaml +++ b/k8s/games/minecraft/deployments.yaml @@ -22,33 +22,147 @@ data: server { listen 80; + # Custom 502 error page with auto-refresh error_page 502 /502.html; location = /502.html { internal; return 200 'Server Loading

Server is loading probably...

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"; - sub_filter "" '

Get Prism Launcher and client.zip for this server. Server address minecraft.hexor.cy:30565

Windows Install Script

'; + + # Inject custom JavaScript and UI elements before closing body tag + sub_filter "" ' + + + +

+ Get Prism Launcher + and client.zip for this server. + Server address minecraft.hexor.cy:30565 +

+ + Windows Install Script + +

+ + + + + + '; + + # Apply sub_filter replacements globally (not just once) sub_filter_once off; } + # Static file serving for client downloads location /clients/ { alias /mc/clients/; - sendfile on; - add_header Content-Disposition "attachment"; - autoindex on; - gzip off; - chunked_transfer_encoding off; + sendfile on; # Enable efficient file serving + add_header Content-Disposition "attachment"; # Force download + autoindex on; # Enable directory listing + gzip off; # Disable compression for downloads + chunked_transfer_encoding off; # Disable chunked encoding } } }