Linux – Hide the ports in the url of a tomcat application

linuxporttomcat6

I have setup tomcat 6 on a server with several different instances which run on different ports

For Eg:

     http://10.XXX.XXX.XXX:8080/myAPP1
     http://10.XXX.XXX.XXX:8088/myAPP2
     http://10.XXX.XXX.XXX:8082/myAPP3

and so on…

These urls are available two the users using these and other applications
Now I want to hide the ports on which each of the applications are running…

So that the user could see only something like this

http://10.XXX.XXX.XXX/myAPP1
http://10.XXX.XXX.XXX/myAPP2
http://10.XXX.XXX.XXX/myAPP3

What is needed to be done for this

I have achieved this for one url (i.e. one port) using the firewall rules and redirect the request on HTTP 80 port to the port that tomcat is listening..

But I want such patter to appear for all the urls…

How can I go about this?

Specs

HOST M/C : 64 bit

OS: Linux Redhat

Tomcat : 6.0

Best Answer

Install a real webserver, like Apache or nginx, and use it's built-in proxying capabilities (mod_proxy on Apache, and HttpProxy core module on nginx) to proxy the path to the appropriate Tomcat application running on a high port.