Apache VirtualHost, multiple sites. 1 ssl with redirect and 1 regular http

Posted by pedalpete on Server Fault See other posts from Server Fault or by pedalpete
Published on 2010-06-01T18:58:42Z Indexed on 2010/06/01 19:04 UTC
Read the original article Hit count: 205

Filed under:
|
|

I've got a server with one site which I am redirecting to https via

<VirtualHost *:80>
     DocumentRoot /var/www/html/secure
     ServerName secure.com
     Redirect / https://secure.com
</VirtualHost>

That works no problem.

Now I'm trying to add another non-secure site

<VirtualHost *:80>
    DocumentRoot /var/www/html/notsecure
    ServerName notsecure.com
</VirtualHost>

of course, because the redirect is on '/', all sites are getting redicted. I've tried changing the Redirect to the full document root, but no luck.

© Server Fault or respective owner

Related posts about ssl

Related posts about virtualhosts