tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: mod_proxy_ajp with multiple ajp ports
Date Thu, 13 Jul 2006 02:58:02 GMT
I've seen some talk on dev@httpd about implementing support for regexps in 
mod_proxy, but I don't think anything has happened yet.

What you want is something like:
  RewriteRule /my/path/.*\.whatever\.else 
ajp://localhost:8285/my/path/$1.whatever.else [P]
Check the documentation for mod_rewrite for more details.

"Christopher Schultz" <> wrote in message

Please forgive me if this question has already been asked. With such a
high volume, searching the archives has been arduous and I haven't found
what I'm looking for.

I'm used to using mod_jk where I can just do this:

JkMount /my/path/*.whatever worker2
JkMount /my/path/*.whatever.else worker3


Note that I'm using the same path space with different path endings to
switch between two different workers.

Now that I'm using mod_proxy_ajp, I've changed my configuration to
something like this:

ProxyPass /my/path ajp://localhost:8185/my/path

It appears that I cannot do something like this:

ProxyPass /my/path/*.whatever.else ajp://localhost:8285/my/path

... and get a different URL space to map into my /second/ AJP target.

Basically, I've got a regular webapp running on ajp:8185 and Cocoon
running on ajp:8285 and I want to be able to forward/proxy requests
appropriately, regardless of the exact paths. For example, it doesn't
seem reasonable that I should have to add an additional path to my
webapp /just/ for cocoon requests, like this:

ProxyPass /my/path/cocoon-only ajp://localhost:8285/my/path

I have tried all manner of combinations of <Location> (doesn't work
because you can't use the 2-argument ProxyPass in a <Location>),
<LocationMatch>, and others to try to get this to work.

My most promising solution involved using mod_rewrite to introduce a
fake URL space (essentially inserting the "cocoon-only" portion into the
URL), but that does one of two things:

1) Replaces the URL in the browser with one that does not exist,
   so reloads don't work. :(
2) Goes into an infinite loop and never loads the page. :(

So, I'm open to any and all suggestions.

Thank you all /so much/ in advance,

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message