0

I am trying to figure out how to map a specific address on a port on a different address. This might be very trivial, but I am not even sure how to ask Google.

I have one machine running two servers: one on port 443, one on port 10000, and one on port 4567. They are all using SSL. My machine has the IP address 123.456.789.123, and so I mapped my domain name www.machine.com to it, and forward the ports in the router, so that I can access the three servers as follows, resp.:

  • https:// www.machine.com
  • https:// www.machine.com:10000
  • https:// www.machine.com:4567

How could I modify my settings to instead have

  • https:// www.machine.com
  • https:// server.machine.com
  • https:// other.machine.com

? Would changes have to occur on my DNS provider, on my router, or on my machine?

Thanks a lot

1 Answers1

2

This cannot be done using DNS directly. A domain name always resolves to a single IP address, the port isn't related to DNS records at all.

However, you can set up a reverse proxy on your web server that is listening on port 443.

You would set up virtual hosts server.machine.com and other.machine.com on the www.machine.com web server, which would then proxy the requests to the web servers on ports 10000 and 4567 respectively.

See more here: https://stackoverflow.com/questions/224664/difference-between-proxy-server-and-reverse-proxy-server

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58