How does one redirect traffic from one server to another depending on subdomain name?

0

Current Layout

One functioning Ubuntu 16.04 server handling public resolution of "domain.com" as well as many other virtual domains and subdomains through a static IP in a home office. This server runs Apache, MySQL, BIND DNS, Postfix and a host of other web based services on various ports.

One additional box running Ubuntu 18.04 with no specific purpose other than to learn how to do this stuff.

One pfSense box handling traffic.

Let's say the following is true:

pfSense is on 192.168.1.1 and is the DHCP server. Ubuntu box 1 is 192.168.1.100 (server1.domain.com) Ubuntu box 2 is 192.168.1.101 (server2.domain.com)

What needs to be in place on either or both servers to be able to enter http://server2.domain.com:[whateverport] to pull up a web-based app on server2 without using the internal IP address?

I am currently able to route that specific port directly to the 2nd server and use the public IP, but I'm stuck attempting to give it a friendly subdomain name.

Thanks!

Jon Griffith

Posted 2020-02-11T19:47:15.833

Reputation: 3

No answers