具有多个虚拟主机的 Apache。 SSL 仅适用于其中之一
我使用配置了 VirtualHosts 的 Apache 2 运行多个网站。它们本身都可以正常工作(即 www.domain1.com、www.domain2.com、www.domain3.com)。
其中一个 VHost 需要通过 HTTPS 运行,因此需要使用通配符域 (*.domain1.com) 设置 SSL,但 SSL 端口似乎也对其他 2 个域开放:例如,我可以访问 https://www.domain2.com。问题在于,浏览器显然会发出警告,因为请求的域与证书上的域不匹配。
我想要做的是完全停止这种行为并阻止对domain2.com 和domain3.com 的https 访问。据我所知,由于实际协议的原因,在接受证书并开始解密标头之前您无法获取服务器名称,但是有人曾经设法解决这个问题吗?
谢谢!
拉夫拉夫克
I run several websites using Apache 2 with VirtualHosts configured. They all work fine on their own (i.e. www.domain1.com, www.domain2.com, www.domain3.com).
One of these VHosts needs to run over HTTPS so has SSL setup with a wildcard domain (*.domain1.com), but it seems that the SSL port is also open for the other 2 domains: for example, I can access https://www.domain2.com. The issue is that obviously the browser issues a warning because the domain requested doesn't match the domain on the certificate.
What I would like to do is stop this behaviour altogether and block access to https to domain2.com and domain3.com. I understand that because of the actual protocol, you can't get the ServerName before having accepted the certificate and started decyphering the headers, but has anybody ever managed to get around that?
Thanks!
rafrafUk
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想解决方案是每个 SSL 站点都有一个唯一的 ip 地址。SSL
虚拟主机的一个 ip(即:88.244.63.215)
http://domain1.com :80
https://domain1.com:443
https:// foo.domain1.com :443
其他虚拟主机的另一个IP(即:88.241.131.152)
http://domain2.com :80
http://domain3.com :80
I guess the solution is having a unique ip adress per SSL site..
One ip for SSL vhost (ie: 88.244.63.215)
http:// domain1.com :80
https:// domain1.com :443
https:// foo.domain1.com :443
Another ip for Other vhosts (ie: 88.241.131.152)
http:// domain2.com :80
http:// domain3.com :80