Created Reverse-proxy BlueMap with NGINX (markdown)

Lukas Rieger 2021-01-16 15:16:43 +01:00
parent 306408de52
commit 53322e2914

@ -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;
}
}
```