Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm basically a newbie to the Apache Tomcat container so bare with me. I'm pretty sure I've got all the settings and configurations down ie, worker.properties, uriworkermap.properties. I'm just curious as to how you reference a file or resource under a certain Context or webapp from the browser itself. Obviously when going thru the Apache webserver you can't enter localhost:8080//file.

Any assistance is much appreciated.

share|improve this question

2 Answers 2

  1. Have apache load mod_jk with LoadModule jk_module mod_jk.so
  2. Specify your workers.properties file in the apache config with JkWorkersFile workers.properties
  3. Route traffic from apache to tomcat in the apache config with JkMount /*.jsp wlb where wlb is defined in your workers.properties file.

See also: http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html#Simple%20configuration%20example

share|improve this answer

Just guessing, and this type of solution would be messy, but here is a thought:

Use mod_jk's JkMount directive to assign specific URLs to Tomcat. In general the structure of a JkMount directive is:

JkMount <URL prefix> <Worker name>

If example the following directives will send all requests ending in .jsp or beginning with /servlet to the "ajp13" worker, but jsp requests to files located in /specificworker will go to "specificworker", where specificworker is a non-AJP HTTP:8_80 worker with one member.

JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /specificworker1/*.jsp specificworker1
JkMount /specificworker2/*.jsp specificworker2
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.