Reverse-proxy and Location headers rewriting

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

 



Hi all,

I'm trying to use apache in a reverse-proxy mode.

There are 3 feature I'd like to use:
1) URL rewriting
2) Cookie path rewriting
3) Location rewriting in case of 30x reply from my backend server

I've made apache working for case 1) but there is something wrong in
the second and the third case.

It does not rewrite the Location header at all and the cookie path is
not rewrited correctly:

example:
1) reply from the backend server to a user with apache between:
backend server >> apache
HTTP 1.1 200 OK
Set-cookie: cookie=[Token]; Path=/app1

2) forward reply from apache to the user
HTTP 1.1 200 OK
Set-cookie: cookie=[Token]; Path=/serv1

instead of  -> Path=/serv1/app1


this is my configuration :
---------CUT---------------
        ServerName rp.extranet.ext
        CustomLog logs/http_rp_log "%h %l %u %t \"%r\" %>s %b"

        ProxyRequests Off
        ProxyPreserveHost On
        ProxyVia off

        ProxyPass /serv1/ http://backend1.intranet.com:80/
        ProxyPass /serv2/ http://backen.intranet.com:8014/

        ProxyPassReverse /serv1/ http://backend.intranet.com:80/
        ProxyPassReverse /serv2/ http://backend.intranet.com:8014/

        <Location /serv1/>
                ProxyPassReverseCookieDomain
http://backend.intranet.com rp.extranet.ext
                ProxyPassReverseCookiePath / /serv1/
        </Location>
-------------END CUT --------------

Any ideas ?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[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