httpd-users mailing list archives

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

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
message

[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

httpd.conf

RewriteEngine on
RewriteMap lb prg:/home/loadbalancer/program.pl

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

 <Proxy balancer://mycluster1>
    BalancerMember http://192.168.10.6:8001/
    ProxySet lbmethod=byrequests
 </Proxy>
 <Proxy balancer://mycluster2>
    BalancerMember http://192.168.10.6:8002/
    ProxySet lbmethod=byrequests
 </Proxy>
 <Proxy balancer://mycluster3>
    BalancerMember http://192.168.10.6:8003/
    ProxySet lbmethod=byrequests
 </Proxy>

--
Regards
Nitesh

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message