Mapping address to multiple tomcat instances Mapping address to multiple tomcat instances apache apache

Mapping address to multiple tomcat instances


You can use nginx (http://nginx.org/en/docs/) as proxy for example.

Try simply (no load balancing etc.):

    server {    listen here.your.ip:80/YourApp;    location / {        root /path/to/your/webapp;        proxy_pass http://host:8080/YourApp;    }}

Same way for other ports


It is quite common to use multiple Tomcats behind Apache to do load balancing. While this is not load balancing the principle is the same. Instead of having one application with 3 load-balanced Tomcat workers, you would have 3 applications with 1 tomcat worker each.

You can find the tomcat documentation here: http://tomcat.apache.org/connectors-doc/


Try mod proxy configuration on below code in httpd:

ProxyPass           /app0   http://localhost:8080/app0/ProxyPassReverse    /app0   http://localhost:8080/app0/ProxyPass           /app1   http://localhost:8081/app1/ProxyPassReverse    /app1   http://localhost:8081/app1/ProxyPass           /app2   http://localhost:8082/app2/ProxyPassReverse    /app2   http://localhost:8082/app2/