Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’m setting up nginx as a reverse proxy for squaremap (a world map viewer for Minecraft servers) and encountering unexpected behavior with trailing slashes. I’ve followed the squaremap documentation for serving with nginx acting as a reverse proxy (https://github.com/jpenilla/squaremap/wiki/Internal-vs-External-Web-Server), but I’m confused by the results. Here’s what I’ve tried:
squaremap is running at 127.0.0.1:39000
Configuration:
location /squaremap {
proxy_pass http://127.0.0.1:39000;
}
Result: Accessing https://example.com/squaremap returns a 404 error.
location /squaremap {
proxy_pass http://127.0.0.1:39000/;
}
Result: https://example.com/squaremap shows a blank page, but https://example.com/squaremap/ works fine.
location /squaremap/ {
proxy_pass http://127.0.0.1:39000/;
}
Result:
https://example.com/squaremap redirects to https://example.com/squaremap/ and then displays the web interface.
https://example.com/squaremap/ works as expected.
In my attempt to figure out what was happening, I read part of the nginx documentation on proxy_pass. However, I’m not sure if my interpretation is correct. My understanding is:
Based on this, I created a table of what I think is happening in each of the above cases:
| Case | Original Request | Request to Upstream | Result |
|---|---|---|---|
| 1 | https://example.com/squaremap |
/squaremap | Error 404 |
| 2.a | https://example.com/squaremap |
/ | White page |
| 2.b | https://example.com/squaremap/ |
// | Works |
| 3 | https://example.com/squaremap/ |
/ | Works |
My questions are:
2a and 3, even though they seem to send the same request to the upstream?/squaremap and /squaremap/ to work correctly without a redirect?I’d appreciate any insights into understanding this behavior and how to properly configure nginx for this use case.
hashembarret@gmail.com
Witomir Łękowski
doug.landau
5350d4b31109448dbeb34a6ffc857a
RuRo
max johnson
rem3n
bo
d.mckinstry
Jim Cason
Charles kubai
Charles kubai