You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by freaky <fr...@bananateam.nl> on 2002/04/30 12:38:04 UTC

Weird vhost problem = now i'm really going nuts :-)

On Tuesday 30 April 2002 12:11, Owen Boyle wrote:

Ok, I tried what you suggested.... I'm really going nuts now :-)
www.bananateam.nl serves /home/apache/main/html
<notdefined>.bananateam.nl serves /home/apache/main/html (as suspected since 
it's the first vhost)
enrico.bananateam.nl serves /home/apache/enrico/html
hasjies.bananateam.nl serves /home/apache/hasjies/html
swanny.bananateam.nl serves /home/apache/swanny/html

And for the bonus points:
freaky.bananateam.nl serves /usr/local/apache/htdocs
which is no longer defined anywhere?...

Please find the config attached :/
And yes... the server was restarted after the changes :-)



> 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

Re: Weird vhost problem = now i'm really going nuts -=- SOLVED

Posted by freaky <fr...@bananateam.nl>.
DOH, the box I was testing from was called freaky.bananateam.nl... since this 
also servers http I didn't see the difference....

sorry about that

thanks again


> On Tuesday 30 April 2002 12:11, Owen Boyle wrote:
>
> Ok, I tried what you suggested.... I'm really going nuts now :-)
> www.bananateam.nl serves /home/apache/main/html
> <notdefined>.bananateam.nl serves /home/apache/main/html (as suspected
> since it's the first vhost)
> enrico.bananateam.nl serves /home/apache/enrico/html
> hasjies.bananateam.nl serves /home/apache/hasjies/html
> swanny.bananateam.nl serves /home/apache/swanny/html
>
> And for the bonus points:
> freaky.bananateam.nl serves /usr/local/apache/htdocs
> which is no longer defined anywhere?...
>
> Please find the config attached :/
> And yes... the server was restarted after the changes :-)
>
> > 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


Re: Weird vhost problem = now i'm really going nuts :-)

Posted by Owen Boyle <ob...@bourse.ch>.
freaky wrote:
> 
> On Tuesday 30 April 2002 12:11, Owen Boyle wrote:
> 
> Ok, I tried what you suggested.... I'm really going nuts now :-)
> www.bananateam.nl serves /home/apache/main/html
> <notdefined>.bananateam.nl serves /home/apache/main/html (as suspected since
> it's the first vhost)
> enrico.bananateam.nl serves /home/apache/enrico/html
> hasjies.bananateam.nl serves /home/apache/hasjies/html
> swanny.bananateam.nl serves /home/apache/swanny/html

All OK - as defined in your config.
> 
> And for the bonus points:
> freaky.bananateam.nl serves /usr/local/apache/htdocs
> which is no longer defined anywhere?...

No, it is defined as:

DocumentRoot /home/apache/freaky/html

However, I begin to suspect caching in your browser or an intermediate
proxy. Clear the cache, close it down and restart. I tried your server
directly just now but it seems to be down (probably you are restarting
it...)

> 
> Please find the config attached :/
> And yes... the server was restarted after the changes :-)

Good.. you'd be surprised how many people forget this.

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