[Cialug] Weird Apache vhost results

David Champion dchampion at visionary.com
Mon Sep 18 09:52:30 CDT 2006


http://httpd.apache.org/docs/1.3/vhosts/name-based.html

-dc

Jonathan Bailey wrote:
> I'm slightly confused by that statement, but I found a solution... I changed
> the VirtualHost stanzas to be "<VirtualHost MACHINEIP:80>" for each non-ssl
> vhost then used the ServerName directive to specify the vhost name.
> 
> 
> 
> Jon
> 
> -----Original Message-----
> From: cialug-bounces at cialug.org [mailto:cialug-bounces at cialug.org] On Behalf
> Of Tom Pohl
> Sent: Monday, September 18, 2006 9:32 AM
> To: Central Iowa Linux Users Group
> Subject: Re: [Cialug] Weird Apache vhost results
> 
> 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
>>
> 
> 
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
> 




More information about the Cialug mailing list