I can't seem to get the Apache directive ProxyPassReverseCookieDomain
to actually rewrite the domain.
My directive is set as such:
ProxyPassReverseCookieDomain "myinternalproxydomain.com" "thepublicdomain.com"
I use the Network tab in a browser and I can see the Set-Cookie
domain is not being altered. I see the Set-Cookie domain as either thepublicdomain.com
or .thepublicdomain.com
. I have tried adding
ProxyPassReverseCookieDomain "myinternalproxydomain.com" ".thepublicdomain.com"
I have searched and read the documentation, however I am failing to see why the domain of the cookie is not being set.
<VirtualHost *:443>
DocumentRoot /var/www/myinternalproxydomain.com
ServerName myinternalproxydomain.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/my.crt
SSLCertificateKeyFile /etc/ssl/private/my.key
SSLCACertificateFile /etc/ssl/certs/my.ca-bundle
SSLProxyEngine On
ProxyRequests Off
ProxyHTMLEnable On
ProxyPreserveHost Off
ProxyHTMLInterp On
ProxyHTMLExtended On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPass "/" "https://thepublicdomain.com/"
ProxyPassReverse / https://thepublicdomain.com/
ProxyPassReverseCookiePath / /
ProxyPassReverseCookieDomain "myinternalproxydomain.com" "thepublicdomain.com"
ProxyPassReverseCookieDomain "myinternalproxydomain.com" "thepublicdomain.com"
ProxyPassReverseCookieDomain "myinternalproxydomain.com" ".thepublicdomain.com"
DirectorySlash On
ProxyHTMLURLMap "https://thepublicdomain.com" "/"
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from all
DirectorySlash On
</Proxy>
<Location />
ProxyHTMLEnable On
ProxyPassReverse "/"
ProxyPassReverseCookieDomain "myinternalproxydomain.com" "thepublicdomain.com"
ProxyPassReverseCookieDomain "myinternalproxydomain.com" ".thepublicdomain.com"
ProxyHTMLURLMap https://thepublicdomain.com /
RequestHeader unset Accept-Encoding
</Location>
<Directory "/var/www/myinternalproxydomain.com">
AllowOverride All
Order allow,deny
allow from all
Options FollowSymLinks
</Directory>
</VirtualHost>
Can anyone enlighten me on where I should look to debug this issue?