Help me set up ssl.conf for multiple domains (name-based vhosts in ssl.conf?)
        Posted  
        
            by mmattax
        on Server Fault
        
        See other posts from Server Fault
        
            or by mmattax
        
        
        
        Published on 2010-03-18T18:46:59Z
        Indexed on 
            2010/03/18
            18:51 UTC
        
        
        Read the original article
        Hit count: 516
        
In my httpd.conf:
If I have my virtual host configured as:
NameVirtualHost *:80
<VirtualHost *:80>
    ServerName foo.com
    ServerAlias www.foo.com
    Include conf.d/foo.conf
</VirtualHost>
<VirtualHost *:80>
    ServerName bar.com
    ServerAlias www.bar.com
    Include conf.d/bar.conf
</VirtualHost>
Can I get by with a single domain SSL certificate or must I purchase a wildcard SSL certificate to handle the www subdomain?
I am now trying to configure the ssl.conf file, can I use name-based vhosts in my ssl.conf file like this:
NameVirtualHost *:443
<VirtualHost *:443>
    ServerName foo.com
    ServerAlias www.foo.com
    ...
    Include conf.d/foo.conf
</VirtualHost>
<VirtualHost *:443>
    ServerName bar.com
    ServerAlias www.bar.com
    ...
    Include conf.d/bar.conf
</VirtualHost>
or do I need IP based vhosts? If this is possible, what kind of cert would I need in order to do this?
© Server Fault or respective owner