Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a VPS running Apache/2.2.22 on Ubuntu Server 12.04 LTS.

I have successfully installed an SSL for

Unfortunately if I visit,, etc… I am presented with certificate warnings as each domain is presenting 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>
    DocumentRoot /var/www/
<IfModule mod_ssl.c>
<VirtualHost *:443>
    DocumentRoot /var/www/
    SSLEngine on
    SSLCertificateFile      /etc/apache2/ssl/
    SSLCertificateKeyFile   /etc/apache2/ssl/domaina.key
    SSLCertificateChainFile /etc/apache2/ssl/

Domain B, C… configuration

<VirtualHost *:80>
    DocumentRoot /var/www/

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, but instead you actually reached a server identifying itself as

Firefox — This Connection is Untrusted. You have asked Firefox to connect securely to, but we can't confirm that your connection is secure.

Safari — Safari can't verify the identity of the website "".

share|improve this question

marked as duplicate by Jenny D, Ward, Falcon Momot, gWaldo, longneck May 24 '13 at 14:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

How did you configure your virtual hosts? What browser and OS did you use? – Michael Hampton May 23 '13 at 22:28
Updated with Virtual Host configuration and browser errors. – esryl May 23 '13 at 22:36
Where are the rest of your virtual hosts? – Michael Hampton May 23 '13 at 22:46
The first configuration is the SSL domain, the remaining Virtual Hosts mirror the second configuration. – esryl May 23 '13 at 22:48
Don't share the IP address, then. – Michael Hampton May 23 '13 at 22:54
up vote 3 down vote accepted

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.

share|improve this answer
Do you know what alternatives are available for forcing non-SSL other than a rewrite rule. As you expected they are only recognised after the certificate warning. Thanks! – esryl May 23 '13 at 22:47
There are no alternatives. – Zoredache May 23 '13 at 22:58
YES THERE ARE ALTERNATIVES!!! – Marcel May 24 '13 at 0:57
@Marcel What are the alternatives? – esryl May 24 '13 at 9:06
@esryl, there is a link in my previous comment that lead to the documentation explaining how to setup what you're looking for. – Marcel May 24 '13 at 16:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.