#502 Bad Gateway Error

1 messages · Page 1 of 1 (latest)

prisma basalt
#

I am trying to reverse proxy my dynmap with nginx, but I am just getting a 502 bad gateway error when I visit the page. I have seen other people online with the same issue, but I can't find a solution anywhere.

mossy kindleBOT
#

Before we get started, please tell us a bit about your server setup:

#

Thank you! Please provide any errors you are experiencing and upload your configuration.txt. Someone from our <@&801354402010628138> team will respond to help shortly. As a general reminder, everyone on our support team is a volunteer, please be kind!

prisma basalt
#

I am on 1.21, but I wouldn't give me an option for that.

willow kettle
#

You configuration.txt looks reasonable. How are you configuring nginx? Is nginx and your Dynmap on the same machine? Can you confirm that you can access http://127.0.0.1:8123/ from the same machine? If you only have SSH access, you could try something like wget http://127.0.0.1:8123/ to check.

prisma basalt
#

Yes nginx and dynmap are running on the same machine and both are running in dockers on a truenas server. One important piece of information that I forgot to give was that I have used the exact same method to configure other ports (like 25565 for my Minecraft serve) and it has worked without issue.
I can access dynmap when I use the port directly. But for security reasons I don't want to forward it.

willow kettle
#

So your nginx should forward some port (80, or 443) and/or subdomain and/or uri to http://192.168.a.b:8123/ I guess? That is, a local address and not your public one.

prisma basalt
#

nginx configuration:

#

Yes nginx is fowarding to 80 and 443

willow kettle
#

Note that the internal server only supports HTTP, not HTTPS

#

(I've never setup nginx, so I'm not sure what these settings mean exactly)

prisma basalt
#

ok, I have both set up.

willow kettle
#

Nginx could probably answer to either, but it must always connect to the internal server using HTTP.

prisma basalt
#

It does

willow kettle
#

Ok, but it fails to connect?

#

What does the nginx log say when you try to access it?

#

Also, is the Dynmap and the nginx server in the same docker or different? I'm assuming the table you show is name, interface(s), public port, internal port, internal IP, protocols, enabled? If so, I'm guessing you have docker setup so that ports 30022 on the physical machine is mapped to 443 in the docker "machine"? Is 8123 on the physical machine mapped to 8123 in the Dynmap docker?

prisma basalt
willow kettle
#

So you got it working?

prisma basalt
#

yep

#

thanks for the help

willow kettle
#

Great! Happy mapping! 🙂

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.

mossy kindleBOT
#

This support thread has been archived due to inactivity. Click the button below to reopen it.