httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bala <balamurugan.mur...@gmail.com>
Subject [users@httpd] Retain Orginal URL after Reverse Proxying
Date Sat, 16 Feb 2013 06:48:19 GMT
I am trying to do a reverse proxy using Apache config file.

I am able to succesfully reverse proxy a user from
https://www4.dev.sonet.se/chatview/ to
http://pkma-usis.kaddi.sonet.fe/chatview

But when i try to retain the host domain name after reverse proxy using
"Header edit Location" directive, it fails.

i.e, After redirection to http://pkma-usis.kaddi.sonet.fe:80/chatview the
user must see the URL as https://www4.dev.sonet.se/chatview.

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>
Use SingleNode jemma-uusi.stadi.sonera.fi:80 chatview chatview
</IfDefine>


<LocationMatch "/chatview/">
   AuthType Basic
   Require valid-user
   AuthName CT
</LocationMatch>

Mime
View raw message