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 many Apache VirtualHosts for each of which I use a dedicated SSLCertificateFile.

This is an configuration example of a VirtualHost:

<VirtualHost *:443>

     ServerName subdomain.domain.localhost

     DocumentRoot "/Users/<my_user_name>/Sites/users/public"
     RackEnv development

   <Directory "/Users/<my_user_name>/Sites/users/publ`enter code here`ic">
     Order allow,deny
     Allow from all

    # SSL Configuration
    SSLEngine on

    #Self Signed certificates
    SSLCertificateFile /private/etc/apache2/ssl/server.crt
    SSLCertificateKeyFile /private/etc/apache2/ssl/server.key
    SSLCertificateChainFile /private/etc/apache2/ssl/ca.crt


Since I am maintaining more Ruby on Rails applications using Passenger Preference Pane, this is a part of the apache2 httpd.conf file:

<IfModule passenger_module>
  NameVirtualHost *:80
  <VirtualHost *:80>
    ServerName _default_
  Include /private/etc/apache2/passenger_pane_vhosts/*.conf

Can I use a single SSLCertificateFile for all my VirtualHosts (I have heard of wildcards) instead of creating one of it for each VirtualHost? If so, how can I change the files listed above?

share|improve this question
possible duplicate of Multiple domains with SSL on same IP – Chris S Jan 4 '11 at 14:27
up vote 1 down vote accepted

If all of your domain virtual hosts exist within one domain then yes. E.g.,, and can all share a single certificate that was created for *

If you do it any other way you'll get certificate warnings.

The only thing you need to do in the config is specify the appropriate certificate file.

share|improve this answer

NO. SSL Certificates are issued for a subdomain i.e but some certificate signing authorities do offer wildcard certificate for a domain * but there are no wildcard certificates. It would compromise the way SSL trust relationship works.

Usually the wildcard for a domain is much more expensive than a regular certificate.

share|improve this answer
Actually, you can get get SSL certs with multiple hostnames defined. I have seen them used for Exchange servers where the internal hostname might be and the external hostname It does require TLS extensions,but that's not a problem these days. Cert providers do know how to charge for these certs though!! – Niall Donegan Jan 12 '11 at 2:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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