httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nitesh naik" <>
Subject [users@httpd] Using RewriteMap value in ProxyPass
Date Tue, 15 Jul 2008 11:34:33 GMT

Is it possible to use value returned from RewriteMap external program
in ProxyPass Directive ? We want use apache loadbalancing feature and
send request to different set of machines  depending on the value
returned by RewriteMap.

Basically RewriteMap program will return cluster value( 1, 2 or 3) and
depending on value it returned request should go to that particular
cluster. ( either cluster1 , cluster2 or cluster3). Pasted config
lines for reference. Config doesn't work and I get following error

[Tue Jul 15 16:10:22 2008] [debug] mod_proxy_balancer.c(42): proxy:
BALANCER: canonicalising URL //mycluster${lb:$1}/
[Tue Jul 15 16:10:22 2008] [debug] mod_proxy_balancer.c(914): proxy:
Entering byrequests for BALANCER (balancer://mycluster${lb:$1})
[Tue Jul 15 16:10:22 2008] [error] proxy: BALANCER:
(balancer://mycluster${lb:$1}). All workers are in error state


RewriteEngine on
RewriteMap lb prg:/home/loadbalancer/

ProxyPass / balancer://mycluster${lb:$1}/ nofailover=Off

 <Proxy balancer://mycluster1>
    ProxySet lbmethod=byrequests
 <Proxy balancer://mycluster2>
    ProxySet lbmethod=byrequests
 <Proxy balancer://mycluster3>
    ProxySet lbmethod=byrequests


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message