On 05/12/2007 01:07 AM, Jim Jagielski wrote: > > On May 11, 2007, at 5:56 PM, Ruediger Pluem wrote: > >> >> >> On 05/11/2007 11:23 PM, Mladen Turk wrote: >> >>> >>> And of course once you introduce wild char maps there must >>> be some sort of exclusion rules. >>> >>> ProxyPass /*/foo/* balancer://bar >>> then for example by extending ProxyBlock >>> ProxyBlock /*/foo/*.gif balancer://bar >>> or by having an ! in front of path >>> ProxyPass !/*/foo/*.gif balancer://bar >> >> >> Do we really need this? >> As we know from Rich's lightning talk at the ApacheCon every directive >> can be replaced by a rewrite rule :-). > > > Except that mod_rewrite is not balancer aware... so using > rewrite rules uses the "default" reverse proxy work, > which, I think, diminishes its usefullness.
Sorry, but this is not true. You can do RewriteRule ^/somewhere(.*) balancer://mycluster/somewhereelse$1 [P] and this *does* work as expected (in 2.2.x and in trunk). And regarding the balancer parameters: You can set them with ProxySet like in the following example. <Proxy balancer://mycluster> BalancerMember ajp://127.0.0.1:7006 route=test redirect=test1 BalancerMember ajp://127.0.0.1:7007 route=test1 ProxySet stickysession=JSESSIONID </Proxy> You currently cannot do the following on 2.2.x: RewriteRule ^/somewhere(.*) http://www.someplace.org/somewhereelse$1 [P] and have the worker http://www.someplace.org/somewhereelse used for this if you have not created it somewhere else e.g. with a dummy ProxyPass. It will use the default "reverse" proxy in this case. But this is not true on trunk. Since r427928 (http://svn.apache.org/viewvc?view=rev&revision=427928) you can do the following: RewriteRule ^/somewhere(.*) http://www.someplace.org/somewhereelse$1 [P] <Proxy http://www.someplace.org/somewhereelse max=10> </Proxy> and the worker http://www.someplace.org/somewhereelse will be used for the requests matching the RewriteRule. Regards RĂ¼diger
