Help me set up ssl.conf for multiple domains (name-based vhosts in ssl.conf?)
- by mmattax
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?