# Reverse proxy for multiple apps, tomcat

**URL:** <https://www.ruby-forum.com/t/reverse-proxy-for-multiple-apps-tomcat/211750>\
**Category:** NGINX\
**Created:** [September 13, 2011, 2:31am UTC](https://www.ruby-forum.com/t/reverse-proxy-for-multiple-apps-tomcat/211750 "2011-09-13T02:31:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [September 13, 2011, 2:31am UTC](https://www.ruby-forum.com/t/reverse-proxy-for-multiple-apps-tomcat/211750/1 "2011-09-13T02:31:38Z")

</div>

Hi,

I’m setting up a reverse proxy to be used by different applications  
working on a tomcat server. The configuration, is using proxy\_pass  
directive but it’s not working, have searched but I’ve been able to  
figure it out.

The scenario is like this:

## |---------------------------| | (NginX) | -----------------------|-------------------------------------------------|-------------------------------------------------| |---------------------------| _ **|** __**|** _**_| ([http://www.app1.com](http://www.app1.com)) \_\_\_\_\_\_\_\_\_ ([http://www.app2.com](http://www.app2.com)) \_\_\_\_\_\_\_\_([http://www.app3.com](http://www.app3.com)) ||_| ||****| -----------------------|/ ****|**** | |**\_\_\_\_\_\_\_\_\_\_\_| ------\> [http://tomcat1:8080/app1\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\|/\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_|](http://tomcat1:8080/app1__________________%5C%7C/___________________________%7C) | Tomcat 1\_\_\_\_\_| --------------------------------------------------------\> [http://tomcat1:8080/app2\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\|/](http://tomcat1:8080/app2__________________%5C%7C/) | (192.168.0.1) \_| ------------------------------------------------------------------------------------------------------\> [http://tomcat1:8080/app3](http://tomcat1:8080/app3)

If anyone can help with this questions:

1.- Do I need to set different IP for each app on the tomcat server?  
currently my apps are on: [http://Tomcat:8080/app1](http://Tomcat:8080/app1),  
[http://Tomcat:8080/app2](http://Tomcat:8080/app2), [http://Tomcat:8080/app3](http://Tomcat:8080/app3) all on the same IP.

2.- Currently I’ve a config but it seems to have problems with the fact  
that I need to publish the application as a root let’s say  
[http://www.app1.com](http://www.app1.com) but this should point to my tomcat on  
[http://tomcat1:8080/app1](http://tomcat1:8080/app1).

Thanks for your help,

Posted at Nginx Forum:

> **[Reverse proxy for multiple apps, tomcat](https://forum.nginx.org/read.php?2,215134,215134#msg-215134)**
>
> Hi, I'm setting up a reverse proxy to be used by different applications working on a tomcat server. The configuration, is using proxy\_pass directive but it's not working, have searched but I've been able to figure it out. The scenario is like this:
