tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 1world1love <jd_co...@yahoo.com>
Subject apache/tomcat/modjk URL path question
Date Tue, 20 Oct 2009 14:59:25 GMT

I know that there is probably an easy solution to this, but all the posts I
have found relating to this don't seem to match my scenario, and most of
them I frankly don't get.

My issue is this: I have a server running apache and tomcat. The server is
behind a load balancer and firewall that manages mapping url paths to
specific servers. So we have a URL: http://example.com and based on the path
it will do this:

http://example.com -> serverA (/app/htdocs)
http://example.com/path -> serverB (/app/htdocs/path)

I have an app in tomcat that I have mounted via JK. If I go to
http://myipaddress:8080/MyApp (by using the ip address I can bypass the load
balancer) than my app loads. If I do http://myipaddress/MyApp my app loads
(again bypassing the LB, but using the modjk). 

But if I do http://example.com/MyApp than obviously this won't work since
the LB will point to serverA. What seems to be at issue is that our
configuration requires that our http root be htdocs and that there be a sub
called 'path' so that although there is a root '/' all of our content is
essentially served from '/path/' since the '/ ' URL will always go to
serverA.

So I have adjusted my modjk mount to handle requests that look like:
http://example.com/path/MyApp, but when tomcat tries to handle this,
obviously it can't find anything at /path/MyApp. It expects /MyApp.

I tried setting a context with path="/path/MyApp"  docBase="MyApp", but that
didn't work. I still get a 404.

So, how can I specify that tomcat should expect '/path' in the URL for all
potential apps?

Thanks in advance. 
-- 
View this message in context: http://www.nabble.com/apache-tomcat-modjk-URL-path-question-tp25976682p25976682.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message