The user has two domains: domain_one and domain_two.
At the DNS level, each domain has multiple subdomains such as mail, ftp, pop, imap, smtp, etc.
In the Apache server configuration, we have default virtual hosts set up for:
<VirtualHost>
ServerName www.domain_one
ServerAlias www.domain_one domain_one
</VirtualHost>
and
<VirtualHost>
ServerName www.domain_two
ServerAlias www.domain_two domain_two
</VirtualHost>
(in this specific order – the order matters).
If a client connects over HTTPS to a subdomain for which no specific virtual host is defined, for example https://pop.domain_two, Apache will choose the SSL certificate from the first matching virtual host for that IP address – in this case, the certificate for domain_one. This results in a browser warning about a certificate mismatch.
Is there any solution to this issue?
At the DNS level, each domain has multiple subdomains such as mail, ftp, pop, imap, smtp, etc.
In the Apache server configuration, we have default virtual hosts set up for:
<VirtualHost>
ServerName www.domain_one
ServerAlias www.domain_one domain_one
</VirtualHost>
and
<VirtualHost>
ServerName www.domain_two
ServerAlias www.domain_two domain_two
</VirtualHost>
(in this specific order – the order matters).
If a client connects over HTTPS to a subdomain for which no specific virtual host is defined, for example https://pop.domain_two, Apache will choose the SSL certificate from the first matching virtual host for that IP address – in this case, the certificate for domain_one. This results in a browser warning about a certificate mismatch.
Is there any solution to this issue?