This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes [Tomcat6/mod_jk/Apache2.2] JkMount and Url patterns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "[Tomcat6/mod_jk/Apache2.2] JkMount and Url patterns" Watch "[Tomcat6/mod_jk/Apache2.2] JkMount and Url patterns" New topic

[Tomcat6/mod_jk/Apache2.2] JkMount and Url patterns

Nikhil Lanjewar

Joined: Jan 21, 2009
Posts: 15

Recently I explored a lot about using mod_jk with Apache Web server and Tomcat. Purpose was to expose only port 80 to the internet cloud and handle maximum types of requests on the same port. I could successfully redirect my requests for Tomcat6 using apache and mod_jk. However, there's a limitation that I could find and it would be great to have some suggestions in this regard.

JkMount /servlet/* worker1

Assuming that worker1 has been configured with type=ajp13 and, this shall map all the requests of the pattern* to*

Now I go ahead writing similar configurations for servlet1, servlet2 and servlet3 with all the url patterns being handled by worker1.
Let's say there are many such servlets hosted on a single Tomcat and I want to avoid writing several configurations by having a context path set for this instance. Something like,

JkMount /tomcat/* worker1

should map* to which, currently maps to* and gives a 404 Not Found (obviously).

I perceive the above as a combination of Proxy and mod_jk but am unable to figure out the exact configurations that are required to achieve the same. Is VirtualHost of any use in this scenario? Can anyone please provide some explanation?
I agree. Here's the link:
subject: [Tomcat6/mod_jk/Apache2.2] JkMount and Url patterns
Similar Threads
Apache + Tomcat - Mod_JK using Loadbalancer to setup clustering
mod_jk // not clear on server.xml configs
Apache SSL Module on Ubuntu
Please help integrating Apache2.0.61 with Tomcat-5.5.15
Default Page, How?