This is what I have in vhost.conf (the mandrake way is to include the
section as a different file).
<VirtualHost 192.168.10.2>
ServerName www.myservername.net
DocumentRoot /var/www/html
</VirtualHost>
NameVirtualHost 192.168.10.2
<VirtualHost 192.168.10.2>
ServerName www.myvirtualhost.com
DocumentRoot /home/user/public_html
</VirtualHost>
It is configured this way as it seems to be the only way it wants to
work for both, at least locally. If I leave the main one out, the
second overrides my main site. Then, if I use the NameVirtualHost
directive prior to the first entry, httpd, when restarted, complains
that one will override the other, and only the first is to be used.
It should be as follows. You only need one NameVirtualHost per ip
address/port pairing. Here port 80 is implied.
NameVirtualHost 192.168.10.2
<VirtualHost 192.168.10.2>
ServerName www.myvirtualhost.com
DocumentRoot /home/user/public_html
</VirtualHost>
<VirtualHost 192.168.10.2>
ServerName www.myservername.net
DocumentRoot /var/www/html
</VirtualHost>