On Tue, 14 Feb 2006 13:14:14 -0600, misiek wrote:
> Davide Bianchi wrote:
>> On 2006-02-14, misiek <michaelaugustyniak.DeleteThis@gazeta.pl> wrote:
>>
>>>my vhosts looks like
>>>
>>>01_firstdomain.com_vhost.conf
>>
>>
>> And do you have a NameVirtualHost *:80 somewhere in your httpd.conf?
>> Because if you don't, the VHost are not used.
>>
>>
>
> yea wneh I put NameVirtualHost to that files I got a message
>
>
> [Tue Feb 14 13:10:35 2006] [error] VirtualHost www.seconddomain.com:0 --
> mixing * ports and non-* ports with a NameVirtualHost address is not
> supported, proceeding with undefined results
> [Tue Feb 14 13:10:35 2006] [error] VirtualHost www.firstdomain.com:0 --
> mixing * ports and non-* ports with a NameVirtualHost address is not
> supported, proceeding with undefined results
> [Tue Feb 14 13:10:35 2006] [warn] NameVirtualHost 111.111.11.111:80 has
> no VirtualHosts
>
> NameVirtualHost 111.111.11.111:80
> <VirtualHost www.firstdomain.com>
> ServerAdmin webmaster@localhost
> DocumentRoot /home/ftp/workspace/firstdomain.com
> Servername www.firstdomain.com
> </VirtualHost>
>
> ~
>
> NameVirtualHost 111.111.11.111:80
> <VirtualHost www.seconddomain.com>
> ServerAdmin webmaster@localhost
> DocumentRoot /home/ftp/workspace/seconddomain.com
> Servername www.seconddomain.com
> </VirtualHost>
OK, this is thae way I do it, and I seem to be permanently answering this
one!
1. Set up either yout local dns or /etc/hosts so that
www.firstdomain.com
and
www.seconddomain.com resolve to 111.111.11.111 ( personally, I'd use a
proper non-routable IP address, not this ).
In the httpd.conf, use the following section:
NameVirtualHost 111.111.11.111:80
<VirtualHost
www.firstdomain.com>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/firstdomain.com
Servername
www.firstdomain.com
</VirtualHost>
<VirtualHost
www.seconddomain.com>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/seconddomain.com
Servername
www.seconddomain.com
</VirtualHost>
Note that there's only one NameVirtualHost statement. If this starts up
cleanly, then it should work!
I think the only mistake in httpd.conf is the extra NameVirtualHost,
which defines separate blocks of virtual hosts.
Steve
>> Stay informed about: two vhost problem