httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
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 www.bananateam.nl 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 www.bananateam.nl VH.
> ServerAdmin webmaster@bananateam.nl
> ServerName www.bananateam.nl
> UseCanonicalName Off
> DocumentRoot "/usr/local/apache/htdocs"

Move this directory container into the www.bananateam.nl 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 webmaster@bananateam.nl
> DocumentRoot /usr/local/apache/htdocs
> ServerName www.bananateam.nl
> </VirtualHost>
> 

Add a <Directory container which allows access to
/home/freaky/public_html to this VH container (similar to that above).
> <VirtualHost *>
> ServerAdmin webmaster@bananateam.nl
> DocumentRoot /home/freaky/public_html
> ServerName freaky.bananateam.nl
> </VirtualHost>
> 
> The weird thing is... freaky.bananateam.nl 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
area.

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message