小编mmi*_*nie的帖子

Apache 反向代理 - ProxyPassReverseCookieDomain 似乎不起作用

我似乎无法让 Apache 指令ProxyPassReverseCookieDomain实际重写域。

我的指令设置如下:

ProxyPassReverseCookieDomain "myinternalproxydomain.com" "thepublicdomain.com"
Run Code Online (Sandbox Code Playgroud)

我使用浏览器中的“网络”选项卡,可以看到Set-Cookie域没有被更改。我将 Set-Cookie 域视为thepublicdomain.com.thepublicdomain.com。我尝试过添加

ProxyPassReverseCookieDomain "myinternalproxydomain.com" ".thepublicdomain.com"
Run Code Online (Sandbox Code Playgroud)

我已经搜索并阅读了文档,但是我不明白为什么没有设置 cookie 的域。

<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" …
Run Code Online (Sandbox Code Playgroud)

proxy cookie apache-2.4

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

apache-2.4 ×1

cookie ×1

proxy ×1