I am trying to do a reverse proxy using Apache config file.
But when i try to retain the host domain name after reverse proxy using "Header edit Location" directive, it fails.
I wanted to know if what I am trying to do is feasible in the first place and if this is a good practice. Following is my config file. Can anyone please help
me in this?
#######################
<Macro SingleNode %h1 %lp %rp>
<Location /%lp/>
Header add Set-Cookie "%Chat_SID=h.%{BALANCER_WORKER_ROUTE}e;\
path=/%lp/;" env=BALANCER_ROUTE_CHANGED
Header edit Location "^(.*pkma-usis.kaddi.sonet.fe.*/%lp/)(.*)$" "/%lp/$2"
</Location>
<Proxy balancer://%lpCluster>
BalancerMember http://%h1 min=1 smax=3 max=10 ttl=10 route=%h1
</Proxy>
ProxyPassReverse /%lp/ http://%h1/%rp/
RewriteRule ^/%lp/(.*) balancer://%lpCluster/%rp/$1 [proxy]
ProxySet balancer://%lpCluster stickysession=%Chat_SID
</Macro>
<IfDefine DEV>
</IfDefine>
<LocationMatch "/chatview/">
AuthType Basic
Require valid-user
AuthName CT
</LocationMatch>