I want the server to respond to https://abc.def.com
, but not to https://def.com
, while still serving http://def.com
when both domains point to the same IP address.
I currently have a configuration something like that:
<IfModule mod_ssl.c>
Listen 1.2.3.4:443
<VirtualHost 1.2.3.4:443>
ServerName abc.def.com
[SSL on, key & cert file, etc.]
[...]
</VirtualHost>
</IfModule>
The site is working as expected and so far everything is fine, but for some reason the server also responds to https://def.com
and serves the certificate for abc.def.com instead of refusing the connection although this is not configured anywhere. The default-ssl.conf is disabled.
Any idea on how to tell the server to not serve a certificate but refuse the connection for non-configured domains? I think this should be somehow related to SNI, but I'm not sure if and how it is possible.