[Cialug] Weird Apache vhost results

jcbailey at code0.net jcbailey at code0.net
Mon Sep 18 09:21:10 CDT 2006


I'm attempting to do both normal vhosting on this box plus one SSL vhost.
Here's what I want:

www.domain.com - Non-SSL
www.domain.com - SSL
www2.domain.com - Non-SSL
www3.domain.com - Non-SSL
wwwx.domain.com - Non-SSL
...

>From what I understand, this should be possible with the SSL and Non-SSL
sharing one IP as long as I have only 1 SSL vhost. The weird thing is that
with the config below, www serves /var/www2, www2 serves /var/www2, and
www(SSL) serves /var/www. Any thoughts on why www is serving www2's
docroot?


Jon

------------------------------------------------

000-default:
------------
NameVirtualHost MACHINEIP:80

FastCGIExternalServer /var/www/plone -host localhost:28081 -pass-header
Authorization -pass-header Cookie -idle-timeout 60 -appConnTimeout 0
<VirtualHost www.domain.com>
        ServerName ubuntuwww.domain.com
        ServerAdmin webmaster at domain.com
        DocumentRoot /var/www
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>


<VirtualHost www2.domain.com>
        ServerAdmin webmaster at domain.com
        ServerName www2.domain.com
        DocumentRoot /var/www2
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>


000-ssl:
------------
<VirtualHost MACHINEIP:443>
        ServerAdmin webmaster at domain.com
        SSLEngine On
        SSLCertificateFile /etc/apache2/ssl/server.crt
        SSLCertificateKeyFile /etc/apache2/ssl/server.key
        DocumentRoot /var/www
        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>



More information about the Cialug mailing list