This question already has an answer here:
I have a linux computer accessible from the internet and I have registered a free dynamic DNS service, let's say its address on the internet is xx.yy.com.
On this computer I have two processes listening: tomcat on port 80 and a small program written by myself on 8080.
As expected I can reach these two respectively with the URLs "xx.yy.com" and "xx.yy.com:8080". I would like to set up a third-level domain to bind to the 8080 port, so that when I type (e.g.) "aa.xx.yy.com" on a browser it has the same effects of "xx.yy.com:8080".
I have no clue on how to do that, can it be done via tomcat configuration (I would rather it be a system configuration than having to rely on tomcat)?
Do I have to set up some daemon to do it for me (I have read about bind)?
Can it be done so that the port 8080 is hidden? I have realized that my work network blocks outgoing connections on ports that are not 80 or 443. So I figured out that a good solution to that may be to move tomcat on another port and put something on 80 to internally redirect traffic to the correct socket. Can it be done? How? Any guide around?