Reverse proxy for multiple apps, tomcat

redonisc nginx-forum at nginx.us
Tue Sep 13 00:31:04 UTC 2011


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.app2.com) ________(http://www.app3.com)
______________________________|____________________________|____________________________|
______________________________|____________________________|____________________________|
-----------------------________________\|/____________________________|____________________________|
|_____________|  ------>
http://tomcat1:8080/app1__________________\|/___________________________|
| Tomcat 1_____| 
-------------------------------------------------------->
http://tomcat1:8080/app2__________________\|/
| (192.168.0.1) _| 
------------------------------------------------------------------------------------------------------>
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/app2, 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 but this should point to my tomcat on
http://tomcat1:8080/app1.


Thanks for your help,

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,215134,215134#msg-215134



More information about the nginx mailing list