You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Bala <ba...@gmail.com> on 2013/02/16 07:48:19 UTC
[users@httpd] Retain Orginal URL after Reverse Proxying
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>
Re: [users@httpd] Retain Orginal URL after Reverse Proxying
Posted by Eric Covener <co...@gmail.com>.
> But when i try to retain the host domain name after reverse proxy using
> "Header edit Location" directive, it fails.
ProxyPreserveHost
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org