I have a VPS running Apache/2.2.22 on Ubuntu Server 12.04 LTS.
I have successfully installed an SSL for domaina.com
Unfortunately if I visit https://domainb.com, https://domainc.com, etc… I am presented with certificate warnings as each domain is presenting domaina.com certificate.
How can I stop this?
Can I stop Apache sending the certificate for all sites sharing the same IP. Can I block port :443 access using ufw for a domain name? Something else?
Domain A configuration
<VirtualHost *:80>
ServerName domaina.com
ServerAlias www.domaina.com
DocumentRoot /var/www/domaina.com/public
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName domaina.com
ServerAlias www.domaina.com
DocumentRoot /var/www/domaina.com/public
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/domaina.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/domaina.key
SSLCertificateChainFile /etc/apache2/ssl/domaina.com.ca-bundle
</VirtualHost>
</IfModule>
Domain B, C… configuration
<VirtualHost *:80>
ServerName domainb.com
ServerAlias www.domainb.com
DocumentRoot /var/www/domainb.com/public
</VirtualHost>
Errors experienced
Browsing using Mac OS X Mountain Lion, latest version of Chrome, Safari, Firefox.
Chrome — This is probably not the site you are looking for! You attempted to reach www.domainb.com, but instead you actually reached a server identifying itself as www.domaina.com.
Firefox — This Connection is Untrusted. You have asked Firefox to connect securely to www.domainb.com, but we can't confirm that your connection is secure.
Safari — Safari can't verify the identity of the website "www.domainb.com".