tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: mod_proxy_ajp with multiple ajp ports
Date Sat, 15 Jul 2006 03:06:46 GMT

"Pid" <p@pidster.com> wrote in message news:44B8057D.4070104@pidster.com...
>
>
> Christopher Schultz wrote:
>> Bill,
>>
>> Thanks for the response.
>>
>>> 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.
>>
>> It doesn't appear to be a question of regular expressions, since the
>> <Location> element can use regular expressions. The problem is that,
>> when those regular expressions are used, it clobbers the URL for
>> proxying, and the proxy attempts to use the wrong source URL (or 
>> something).
>>
>>> What you want is something like:
>>>   RewriteRule /my/path/.*\.whatever\.else
>>> ajp://localhost:8285/my/path/$1.whatever.else [P]
>>
>> For whatever reason, this does not work on its own. I figured that I
>> could do something like this:
>>
>> RewriteRule /myApp/some/special.url \
>>             ajp://localhost:8285/myApp/special.url [P]
>> RewriteRule /myApp/(.*) \
>>             ajp://localhost:8185/myApp/$1 [P]
>>
>> ...but that's not enough. You have to mix both RewriteRule /and/
>
>> ProxyPass to achieve the desired result:
>>
>> RewriteRule /myApp/some/special.url \
>>             ajp://localhost:8285/myApp/special.url [P]
>> ProxyPass /myApp ajp://localhost:8185/myApp
>
> AFAIK you can only use the ProxyPass directive to set the additional
> configuration parameters (lb type etc).
>
> I've used a single long none-existent URL to do that where needed, and
> just used the ReWrite rule to parse the URLs.
>

This is right, if you haven't configured the worker in a
   <Proxy balancer://mycluster>
        BalancerMember ajp://localhost:8285
   </Proxy>
Otherwise, yeah, just use a non-existent URL in the ProxyPass directive. 
You might also consider writing up a bug report for the Httpd BZ.
>
>> My best guess is that Apache requires the ProxyPass directive in there
>> so that my virtual host gets configured to use mox_proxy /at all/. I'd
>> imagine that I could have as many RewriteRules as I needed, as long as
>> that one ProxyPass directive is in there.
>>
>> Perhaps someone with a better understanding can tell me what's really
>> going on.
>>
>> For now, I'm happy since it appears to work exactly as desired.
>>
>> Thanks a lot for the help!
>>
>> -chris
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message