I have apache2.2 on CentOS 6, having SSL enabled in configuration block. It serves the SSL pages for a host name first.defaultdomain.com (example) which is mapped to the default IP of the server. It is accessed via https://first.defaultdomain.com.
For the same default IP, I have multiple NameVirtualHost on port 80 (let's say there are two more hostnames, mapped to this IP, second.defaultdomain.com and third.defaultdomain.com).
If somebody mistypes the protocol part of the URL for second.defaultdomain.com, e.g. https_:_//second.defaultdomain.com, that person gets the SSL pages for first.defaultdomain.com and a warning about the certificate not matching the hostname (which is correct).
Is there a way to distinguish a request to https_://first.defaultdomain.com from https:_//second.defaultdomain.com (both hostnames mapped to same IP) ?
EDIT: I do not want to serve https for second.defaultdomain.com or third.defaultdomain.com, only first.defaultdomain.com.
regards, Gašper