Does Apache2 Configured as ReverseProxy Hide Cookies Set by Backend Servers?

Posted by Ianthe on Server Fault See other posts from Server Fault or by Ianthe
Published on 2012-09-04T09:27:08Z Indexed on 2012/09/04 9:39 UTC
Read the original article Hit count: 352

Filed under:
|
|

I use Apache 2.2.16 as Reverse Proxy. For a static website, I don't have any issues. However, when began to use cookies, I've noticed that cookies are not being sent to the client.

Here's a snippet of my config:

<VirtualHost *:80>
    ServerName  app.somewhere.com:80
    ServerAlias app

    ProxyRequests Off
    ProxyPreserveHost On

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass /app http://10.x.x.x/app
    ProxyPassReverse /app http://10.x.x.x/app

    <Location />
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

But when I try to access the app server directly, I receive the cookies ok.

Is this an expected behaviour for Apache2? I'm using HAProxy for another application that sends cookies to the client and I get all of them.

© Server Fault or respective owner

Related posts about apache2

Related posts about reverse-proxy