• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

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

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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 host=example.com, this shall map all the requests of the pattern http://example.com/servlet/* to http://example.com:8080/servlet/*

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 http://example.com/tomcat/servlet/* to http://example.com:8080/servlet which, currently maps to http://example.com:8080/tomcat6/servlet/* 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?
 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic