Skip to content

Commit 9d160a2

Browse files
authored
Nginx webserver clarification (#131)
* Add additional detail to the nginx configuration section add info for if you have multiple servers, clearing up some confusion. * Fix typo in PterodactylNginxProxy change usefull to useful, in the first info block * Fix: Call SQL.php a php script change "the SQL script" to "the PHP script"
1 parent 0cd7ce4 commit 9d160a2

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

community/PterodactylNginxProxy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Extended guide for setting up a reverse proxy for BlueMap with Pterodactyl and N
2121

2222
> **Info:**<br>
2323
> We advise you to read the [Reverse Proxy BlueMap with NGINX](https://bluemap.bluecolored.de/wiki/webserver/NginxProxy.html) guide first.
24-
> And also the [Pterodactyl Minecraft community guide](https://pterodactyl.io/community/games/minecraft.html) it contains usefull info about the allocations.
24+
> And also the [Pterodactyl Minecraft community guide](https://pterodactyl.io/community/games/minecraft.html) it contains useful info about the allocations.
2525
{: .info }
2626

2727
## Setting up the server allocations in pterodactyl

wiki/webserver/ExternalWebserversSQL.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Then you go into the webroot and open the `sql.php`, and set your SQL-Connection
4242
Now you need to configure your webserver, so that it rewrites all requests for which no static file exists to the `sql.php`.
4343

4444
## NGINX
45-
On nginx this can be achieved with e.g. `try_files $uri /sql.php;`.
45+
On nginx this can be achieved with e.g. `try_files $uri /sql.php;`. This uses the PHP script to fetch the map tiles from your database.
4646

4747
With some context your website-config could look something like this:
4848
```nginx
@@ -66,10 +66,28 @@ server {
6666
# Proxy requests to the live data interface of each map to bluemaps integrated webserver
6767
# If you have multiple servers you will need to proxy each map-id to the correct server
6868
location ~* /(maps/[^/\s]*/live/.*) {
69-
proxy_pass http://127.0.0.1:8100/$1;
69+
proxy_pass http://123.4.5.6:8100/$1;
7070
}
7171
}
7272
```
73+
74+
If you have multiple servers, you can simply add another location block for each map, as follows:
75+
76+
```nginx
77+
location ~* /(maps/world/live/.*) {
78+
proxy_pass http://123.4.5.6:8100/$1;
79+
}
80+
81+
location ~* /(maps/world_nether/live/.*) {
82+
proxy_pass http://654.3.2.1:8100/$1;
83+
}
84+
```
85+
86+
With this in your config, you will be fetching the live data for `world` from 123.4.5.6 and for `world_nether` from 654.3.2.1 .
87+
> **Info:**
88+
> You will need to change your existing location block to specify which map is on the server. Then create any other needed blocks.
89+
{: .info }
90+
7391
> **Important:**<br>
7492
> The above config is **just an example** and not a complete config you can just copy&paste. You **will** need to adapt it to your setup!
7593
{: .info .important }

0 commit comments

Comments
 (0)