httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trilok <mailinglis...@gmail.com>
Subject [users@httpd] Obtain part of url in proxy balancer from one balancer member
Date Wed, 06 Nov 2013 08:00:24 GMT
Hi

I have cluster setup of Apache server . Behind this I have 2 Jboss
instances which is load balanced by Apache.

The configuration look somewhat like the below










*<VirtualHost *:1111>        ServerAdmin admin@example.com
<admin@example.com>        ServerName www.example.com
<http://www.example.com>        DocumentRoot "/apps"        ErrorLog
"logs/https.www.example.com.-error_log"        TransferLog
"logs/https.www.example.com-access_log"        LogLevel warn*
















































*        <Directory "/apps">                Options -Indexes
+FollowSymLinks                AllowOverride None                Order
allow,deny                Allow from all        </Directory>
SSLProxyEngine On        SSLProxyVerify On
SSLProxyMachineCertificateFile "/apps/apache/conf/ssl/int/proxy.pem"
SSLProxyCACertificateFile "/apps/apache/conf/ssl/int/cert.pem"
RewriteEngine On        Header set Cache-Control "max-age=60, public"
<Proxy balancer://2node-aa>                        BalancerMember
https://app01:8089 <https://app01:8089> route=node1
BalancerMember https://app02:8089 <https://app02:8089>
route=node2                       ProxyPreserveHost On        ProxyPass /aa
balancer://2node/aa stickysession=JSESSIONID|jsessionid        ProxyPass
/static balancer://2node/static stickysession=JSESSIONID|jsessionid
ProxyPassReverse /aa balancer://2node/aa        ProxyPassReverse /static
balancer://2node/static                ProxyPass /1/aa
https://app01:8089/aa <https://app01:8089/aa>        ProxyPass /2/aa
https://app02:8089/aa <https://app02:8089/aa>        ProxyPassReverse /1/aa
https://app01:8089/aa <https://app01:8089/aa>        ProxyPassReverse /2/aa
https://app02:8089/aa <https://app02:8089/aa>        ProxyPass /bb
balancer://2node/rest stickysession=JSESSIONID|jsessionid
ProxyPassReverse /bb balancer://2node/bb</VirtualHost>*
In the url access certain part of the url i want it to be routed from
second node i.e node2 of jboss.

e.g. if i am accessing http://www.example.com/aa/login/login.jsp i need
this request to be process by node2 app02 only.

Rest of the request should load balance as normal access. How do i set the
apache to do it ?

I did try this but it does not work.

<Proxy balancer://2node-aa>

BalancerMember https://app02:8080 route=node2

</Proxy>
RewriteRule ^/aa/login/(.*)$ balancer://2node-aa$1 [P]

I had put it just above the balancer with two node.
------------------------------
Don't see any error in the log file.

Mime
View raw message