0

I'm pretty sure I've got all the settings and configurations down ie, worker.properties, uriworkermap.properties. I'm 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.

2 Answers 2

0
  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

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .