Retain Orginal URL after Reverse Proxying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux