httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From freaky <fre...@bananateam.nl>
Subject Re: Weird vhost problem
Date Tue, 30 Apr 2002 10:27:30 GMT
On Tuesday 30 April 2002 12:11, Owen Boyle wrote:

Thanks I'll try... FYI, with nothing! changed in the main config the complete 
vhost config in this order is now active:

<VirtualHost *>
ServerAdmin webmaster@bananateam.nl
DocumentRoot /home/apache/main/html
ServerName www.bananateam.nl
</VirtualHost>

<VirtualHost *>
ServerAdmin webmaster@bananateam.nl
DocumentRoot /home/apache/freaky/html
ServerName freaky.bananateam.nl
</VirtualHost>

<VirtualHost *>
ServerAdmin hasjies@bananateam.nl
DocumentRoot /home/apache/hasjies/html
ServerName hasjies.bananateam.nl
</VirtualHost>

<VirtualHost *>
ServerAdmin enrico@bananateam.nl
DocumentRoot /home/apache/enrico/html
ServerName enrico.bananateam.nl
</VirtualHost>

<VirtualHost *>
ServerAdmin swanny@bananateam.nl
DocumentRoot /home/apache/swanny/html
ServerName swanny.bananateam.nl
</VirtualHost>

Now... for the really weird stuff
everything works as expected with exception of freaky.bananateam.nl
www.bananateam.nl serves /home/apache/main/html as do 
<notdefined>.bananateam.nl as expected since this is the default
hasjies,swanny,enrico@bananateam.nl serve up the directories they are 
configured to serve
freaky.bananateam.nl serves /usr/local/apache/htdocs :/ as defined in the main 
directives DocumentRoot...
Something is really weird with this syntax checking :-)

Anyways, I'll try your suggestion... thanks


> 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


---------------------------------------------------------------------
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