httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <>
Subject Re: Weird vhost problem
Date Tue, 30 Apr 2002 10:11:59 GMT
freaky wrote:
> Hey there,
> I got a really weird vhost problem...
> I've got 1 IP address and I want to be the main site. I set
> this up:

It is all to do with having DocumentRoot and ServerName directives at
server-config level. They are overrriding the VH directives. Make the
changes detailed below and see how it goes...

This is OK, but redundant (it's the default)
> Listen 80

Remove the following four directives - you don't need them since they
are redefined inside the VH.
> ServerAdmin
> ServerName
> UseCanonicalName Off
> DocumentRoot "/usr/local/apache/htdocs"

Move this directory container into the VH.
> <Directory "/usr/local/apache/htdocs">
> Options FollowSymLinks
>  AllowOverride None
>  Order allow,deny
>     Allow from all
> </Directory>

Now the only place you find DocumentRoot and ServerName directives is
inside VH containers (which is where they should be). 

> NameVirtualHost *
> <VirtualHost *>
> ServerAdmin
> DocumentRoot /usr/local/apache/htdocs
> ServerName
> </VirtualHost>

Add a <Directory container which allows access to
/home/freaky/public_html to this VH container (similar to that above).
> <VirtualHost *>
> ServerAdmin
> DocumentRoot /home/freaky/public_html
> ServerName
> </VirtualHost>
> The weird thing is... just serves the main site.. (which
> is still the default page + manual by apache installation). 

I guess what was happening was that the request was being served by the
server-config definitions which were read before we got into the VH


Owen Boyle.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message