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
ServerName domaina.com
ServerAlias www.domaina.com
DocumentRoot /var/www/domaina.com/public
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
Domain B, C… configuration
ServerName domainb.com
ServerAlias www.domainb.com
DocumentRoot /var/www/domainb.com/public
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".
Answer
This is expected behavior. You have a couple options here - you can either use Subject Alternative Names in your SSL cert and serve the names for the other domains, you can get a new IP for the other domains, or you can force the other domains to be non-SSL. The last might not work very well, as you will likely end up using an Apache rewrite rule, which may only be recognized after the browser presents it's certificate warning.
Comments
Post a Comment