Hi,
It is a bit late for a reply, but it took our system administrators some
time to finally commit the changes. The last thing you wrote did indeed
work, although you must make sure to remember to set the "SetHandler
jakarta-servlet" or it won't do anything with the values you have set.
Now I did turn out to work a little different. I did eventually change
the name of the newer applications for reasons other then described in
the problem. So the solution turned out to be a combination of a
rewriterule, proxypassreverse and a jkmount.
I did not have to change anything for the old applications, so I will
only list the configuration of the new ones (and this only if anybody
ever comes across the same problem...
So the rewriterule is something like this:
RewriteRule ^/cartagenia/bench/(.*) /bench_$1 [P]
ProxyPassReverse /cartagenia/bench/ http://www.esat.kuleuven.be/bench_
Notice that I only use the option [P], and not [PT]. This because I
forward the original url to a new url on the same server, which causes
it to actually go back into the start of the process but with a
different url. It seems logical now, but was something I overlooked when
trying things out...
I then have a separate JkMount rule that forwards everything starting
with bench_:
JkMount /bench_* cartagen
So the solution turned out to be completely different from what I
initially planned, but eventually we found a way to get the needed
results. Thanks again for all your help Rainer.
Greetings
Edwin
Rainer Jung wrote:
OK, then plan B:
mod_jk has a less known way of deciding which worker to use when
forwarding requests. You can also put the name of the worker to use in
an httpd environment variable. If no JkMount matches, mod_jk checks
the value of this variable, and if set, it sends the request to the
worker that has the same name as the value of the variable.
What's nice: mod_rewrite in httpd 2.2 is able to set environment
variables.
So you can first have a rule, that takes the original URL and sets the
name of the worker (old_worker vs. new_worker9 into the variable, and
the next rule rewrites the URL (removing the /something).
See "'env|E=VAR:VAL' (set environment variable)" in
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html.
For the name of the environment variable, it is "JK_WORKER_NAME". You
can even change the name of the variable, if you don't like it with
the directive JkWorkerIndicator. For the details and an example see
"Using SetHandler and Environment Variables" in
http://tomcat.apache.org/connectors-doc/reference/apache.html
Have fun!
Rainer
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]