Skip to content

Commit 5c886d1

Browse files
jensz12TBlueF
andauthored
Add a guide for Caddy (#113)
* Add a Caddy guide Basically a copy of the Nginx one, just for Caddy. Well tested as i use this setup myself * Update CaddyProxy.md * Merged caddy into the nginx page * Small changes --------- Co-authored-by: Lukas Rieger <[email protected]>
1 parent 85e23eb commit 5c886d1

File tree

1 file changed

+30
-12
lines changed

1 file changed

+30
-12
lines changed
Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
---
22
layout: page
3-
title: Reverse-Proxy with NGINX
3+
title: Reverse-Proxy
44
parent: Webserver
55
grand_parent: Wiki
66
nav_order: 3
77
---
88

9-
# Reverse proxy BlueMap with NGINX
9+
# Reverse proxy BlueMap
1010

11-
Here are some examples how you can use NGINX to reverse-proxy your BlueMap.
11+
Here are some examples how you can use an external webserver to reverse-proxy your BlueMap.
1212

1313
This is useful if you want to integrate your map in your website, or want to add SSL-capabilities.
1414

1515
## Assumptions / Prerequisites
1616
- You have access to your servers shell (not only the minecraft-console).
17-
- You have NGINX already
18-
[installed](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/).
19-
- NGINX is running on the same machine as BlueMaps integrated webserver. *(If that is not the case you'll need to
17+
- You have your external webserver like [NGINX](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/) or [Caddy](https://caddyserver.com/docs/install) already
18+
installed.
19+
- The external webserver is running on the same machine as BlueMaps integrated webserver. *(If that is not the case you'll need to
2020
replace `localhost` with the correct ip in the examples below)*
2121
- BlueMaps integrated webserver is running on port `8100`. *(Again, just replace `8100` with the actual port below)*
2222

2323
> **Info:**<br>
2424
> If you want, you can tell the internal-webserver to only connect to one specific address like e.g. `127.0.0.1`,
25-
> so it is no longer accessible from the outside (by default it just connects to all available interfaces):
25+
> so it is no longer accessible from the outside (by default it just connects to all available interfaces):
2626
> To do this, just open the `webserver.conf` and add the `ip: "127.0.0.1"` setting somewhere.
2727
{: .info }
2828

2929
## BlueMap on a subdirectory of your website
30-
If you have a normal website hosted with NGINX and want your map on `/map` (e.g `https://mydomain.com/map`) then
31-
you can just add this to your NGINX configuration:
30+
You have a normal website hosted on your webserver and want your map on `/map` (e.g `https://mydomain.com/map`)...
31+
32+
### NGINX
3233
```nginx
3334
server {
34-
35+
3536
...
3637
3738
location /map/ {
@@ -40,9 +41,19 @@ server {
4041
}
4142
```
4243

44+
### Caddy
45+
```
46+
mydomain.com {
47+
handle_path /map/* {
48+
reverse_proxy 127.0.0.1:8100
49+
}
50+
}
51+
```
52+
4353
## BlueMap on a subdomain
44-
If you want BlueMap on a subdomain e.g. `https://map.mydomain.com/` then you'd add something like this to
45-
your nginx config:
54+
You want BlueMap on a subdomain e.g. `https://map.mydomain.com/`...
55+
56+
### NGINX
4657
```nginx
4758
server {
4859
listen 80;
@@ -55,3 +66,10 @@ server {
5566
}
5667
}
5768
```
69+
70+
### Caddy
71+
```
72+
map.mydomain.com {
73+
reverse_proxy 127.0.0.1:8100
74+
}
75+
```

0 commit comments

Comments
 (0)