Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion community/PterodactylNginxProxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Extended guide for setting up a reverse proxy for BlueMap with Pterodactyl and N

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

## Setting up the server allocations in pterodactyl
Expand Down
22 changes: 20 additions & 2 deletions wiki/webserver/ExternalWebserversSQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Then you go into the webroot and open the `sql.php`, and set your SQL-Connection
Now you need to configure your webserver, so that it rewrites all requests for which no static file exists to the `sql.php`.

## NGINX
On nginx this can be achieved with e.g. `try_files $uri /sql.php;`.
On nginx this can be achieved with e.g. `try_files $uri /sql.php;`. This uses the SQL script to fetch the map tiles from your database.
Copy link
Member

@TBlueF TBlueF Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "SQL script" is misleading as it's actually a php-script called sql.php :D
Also isn't this just duplicated information from the entire section above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, fair point about it being a PHP script. I think it is useful to explain again here, since it shows people how that SQL.php translates into map tiles, and clarifies that it's only tiles, not live data.

I wonder if changing SQL to PHP in that sentence might clear things up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully my latest commit should resolve this ;)

Copy link
Member

@TBlueF TBlueF Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and clarifies that it's only tiles, not live data

That is actually not necessarily true. It's possible to tell bluemap to write player-positions and markers (the "live" data) into the database at an interval, and then that script fetches that as well. Additionally the script also reads things like player-head-icons from the database, or marker icons if they are saved to the map's asset storage by an addon ^^

But i think what you meant by it (-> it fetches map-data, not static webapp-files) is coming across. So i am fine with merging it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, forgot you can write all that to the database.

What do you think of my change to line 69? I was 50/50 on it, since it's not a normal setup, but matches the example below. I believe that TechnicJelle feels similarly, from our conversation in the discord yesterday.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk, both is fine i guess..

Most setups that end up in discord-support actually need 172.18.0.1 in all 3 proxy-pass examples because they just have multiple pterodactyl-containers but different ports for each server ..
But you can argue that there is no real point in having a network of servers if they are all on the same machine anyways, so whatever you choose, there is pro's and con's ^^


With some context your website-config could look something like this:
```nginx
Expand All @@ -66,10 +66,28 @@ server {
# Proxy requests to the live data interface of each map to bluemaps integrated webserver
# If you have multiple servers you will need to proxy each map-id to the correct server
location ~* /(maps/[^/\s]*/live/.*) {
proxy_pass http://127.0.0.1:8100/$1;
proxy_pass http://123.4.5.6:8100/$1;
}
}
```

If you have multiple servers, you can simply add another location block for each map, as follows:

```nginx
location ~* /(maps/world/live/.*) {
proxy_pass http://123.4.5.6:8100/$1;
}

location ~* /(maps/world_nether/live/.*) {
proxy_pass http://654.3.2.1:8100/$1;
}
```

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 .
> **Info:**
> You will need to change your existing location block to specify which map is on the server. Then create any other needed blocks.
{: .info }

> **Important:**<br>
> 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!
{: .info .important }
Expand Down