I am having a problem with trying to redirect subdomain url to a Application server that have apps on different ports but a single IP address.
Basically, here are the steps:
Client outside the network types in subdomain sub1.example.com, sub2.example.com, sub3.example.com. The DNS server is redirecting the information to a Gateway server, so all subdomains go to single external IP address 22.214.171.124. This is done and it works, it shows the Apache default page. The problem i am struggling is to redirect each subdomain from the Gateway server to the internal App server with single IP address 192.168.0.80 that have 3 apps for each subdomain on different ports.
Locally this works perfectly as i am calling the apps for example: https://192.168.0.80:1000, https://192.168.0.80:2000, https://192.168.0.80:3000.
However, I want to redirect each subdomain that the gateway server received to the appropriate port on the single IP address App server, as in sub1.example.com -> https://192.168.0.80:1000, sub2.example.com – > https://192.168.0.80:2000 and sub3.example.com -> https://192.168.0.80:3000.
I have tried with bind9, with apache virtuahost but no luck. I think I can try with squid also, however if someone can point something to use with apache or something else on Linux Debian. Is this possible ? As shown on the picture bellow.
enter image description here