[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Apache reads from wrong DocumentRoot



> -----Original Message-----
> From: The sky is the limit [mailto:havarden@cloudchaser.net] 
> 
> <VirtualHost foouser.foo.com>
> DocumentRoot /var/www/foo
> ServerName foouser.foo.com
> ..
> ..
> </VirtualHost>
> 

You're still doing it wrong.  If you're using NameVirtualHosts, the
<VirtualHost> directive takes an IP as an argument, not a name.  Like so:

NameVirtualHost 10.0.0.1

<VirtualHost 10.0.0.1>
ServerName www.foo.com
...
</VirtualHost>

<VirtualHost 10.0.0.1>
ServerName www.bar.com
...
</VirtualHost>

If you don't want to type that IP every time, and if you're not using IP
based virtual hosting as well, you can replace them all with "*" instead,
which will listen on all addresses and perform virtual lookups for all of
them.

... Adam



Reply to: