How can I use VirtualDocumentRoot to serve the www subdomain with SSL enabled?

Posted by mdgreenwald on Server Fault See other posts from Server Fault or by mdgreenwald
Published on 2011-02-13T07:41:41Z Indexed on 2012/04/02 5:33 UTC
Read the original article Hit count: 634

Filed under:
|
|
|
|

I am able to serve http://www.domain.com and http://domain.com. Also https://domain.com works fine too. But not https://www.domain.com for some reason this doesn't work. I even created a www.domain.com in my sites-availible folder and also enabled it. I reloaded the configuration and yet it still doesn't work.

I have a wildcard certificate so that is NOT the problem.

    <IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin [email protected]
        ServerName *.domain.com:443
        ServerAlias www.domain.com
        VirtualDocumentRoot /var/www/%0

Thanks for any help.

© Server Fault or respective owner

Related posts about ubuntu

Related posts about ssl