开发者

HTTPS block domain

When having mu开发者_如何学Pythonltiple domain names point to the same server. But you only have a certificate for one of these domains, is it possible to block the other domains in Apache. But only when HTTPS is used not when HTTP is used.

I tried using a NameVirtualHost setup for 443 port. But when the domain is not found Apache simply defaults to the first virtual host. I would like it to refuse the connection. In this way when connecting directly through HTTPS on one of the not supported domains the connection is refused rather then having the browser display warning screen because of a wrong identity.

Any thoughts?


Not possible. This is a chicken and egg problem - to verify an https connection the browser connects and tries to validate the certificate/common name and the given URL. The first handshake / connection to port 443 has to be encrypted.

The only way to handle this problem would be to setup dedicated IPs for all domains - or for at least the domain using HTTPS.


It's far from ideal, but another option would be to use a non-standard for your HTTPS site and not have the server listening on port 443.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜