From 53322e2914d100ddf75daec03014bc14b5a6cba8 Mon Sep 17 00:00:00 2001 From: Lukas Rieger Date: Sat, 16 Jan 2021 15:16:43 +0100 Subject: [PATCH] Created Reverse-proxy BlueMap with NGINX (markdown) --- Reverse-proxy-BlueMap-with-NGINX.md | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Reverse-proxy-BlueMap-with-NGINX.md diff --git a/Reverse-proxy-BlueMap-with-NGINX.md b/Reverse-proxy-BlueMap-with-NGINX.md new file mode 100644 index 0000000..d6f5964 --- /dev/null +++ b/Reverse-proxy-BlueMap-with-NGINX.md @@ -0,0 +1,37 @@ +Here are some examples how you can use NGINX to reverse-proxy your BlueMap. + +This is useful if you want to integrate your map in your website, or want to add SSL-capabilities. + +## Assumptions / Prerequisites +- You have access to your servers shell (not only the minecraft-console). +- You have NGINX already [installed](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/). +- NGINX is running on the same machine as BlueMaps integrated webserver. *(If that is not the case you'll need to replace `localhost` with the correct ip in the examples below)* +- BlueMaps integrated webserver is running on port `8100`. *(Again, just replace `8100` with the actual port below)* + +## BlueMap on a subdirectory of your website +If you have a normal website hosted with NGINX and want your map on `/map/` (e.g `https://mydomain.com/map/`) then you can just add this to your NGINX configuration: +```nginx +server { + + ... + + location ~/map(.*)$ { + proxy_pass http://localhost:8100$1; + } +} +``` + +## BlueMap on a subdomain +If you want BlueMap on a subdomain e.g. `https://map.mydomain.com/` then you'd add something like this to your nginx config: +```nginx +server { + listen 80; + listen 443 ssl; + + server_name map.mydomain.com; + + location / { + proxy_pass http://localhost:8100; + } +} +``` \ No newline at end of file