I once again need your expertise on the following, can you please help?
I've set up a server and I'd like to host two web applications (living on two different tomcats) from different ports; however I could not figure out how to forward the requests to a specific port based on the domain name.
In a nutshell I want www.firstdomain.com
to go to 8080 and www.seconddomain.com
to go to port 8081 seemlessly with sessions etc... (I do not want people to see the trailing port numbers by the way)
This is what I have so far:
I'm running on Ubuntu Server Edition (linux of course) with Apache 2 and two tomcats.
I've managed to have my tomcats listen to different ports already (tomcat1 is listening to 192.168.1.9:8080 and tomcat2 is listening to 192.168.1.9.8081).
I'm a newbie on this, and I'm not sure if I can do this with iptables or do I have to get dirty with VirtualHosts mod_proxy etc (which scares me).
Thank you in advance.