我正在尝试启用代理虚拟主机:
<VirtualHost *:80> ServerName xxxxx.domain.tdl SSLProxyEngine On SSLProxyCheckPeerCN on ProxyPass / https://localhost:1234 ProxyPassReverse / https://localhost:1234 </VirtualHost>
但我有一个500 err和我的error.log(apache2)显示:
[2012年1月3日星期二15:41:42] [错误](502)未知错误502:代理:传递请求正文失败[:: 1]:1234(本地主机)
[tue Jan 03 15:41:42 2012] [error] proxy:pass request body failed to [:: 1]:1234(localhost)from 82.252.xxx.xx()
缺less一些参数?
如果浏览器正在为xxxxx.domain.tdl设置cookie,并且服务器将它们返回给本地主机或本地定义的域,则可能是不匹配的。 您可以使用ProxyPassReverseCookieDomain重写Cookie。
既然他们都在/,你可能不需要ProxyPassReverseCookiePath 。
使用127.0.0.1而不是localhost ,可能你的应用程序没有运行IPv6
ProxyPass / https://localhost:1234/ ProxyPassReverse / https://localhost:1234/
试试看。 斜线匹配很重要。