[Cialug] Weird Apache vhost results

Tom Pohl tom at tcpconsulting.com
Mon Sep 18 09:31:49 CDT 2006


On your VirtualHost declarations, you can only use NameVirtualHost  
entries that have been created (MACHINEIP:80 for example not  
www.domain.com).

-Tom

On Sep 18, 2006, at 9:21 AM, jcbailey at code0.net wrote:

> 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>
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>



More information about the Cialug mailing list