You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "RYAN M. vAN GINNEKEN" <lu...@computerking.ca> on 2006/03/20 17:51:56 UTC

Re: [users@httpd] virtual server problems SOLVED

----- Krist van Besien <kr...@gmail.com> wrote:
> On 3/20/06, RYAN M. vAN GINNEKEN <lu...@computerking.ca> wrote:
> > Hello all everthing was working fine until i reset my fedora box
> today not sure what happened but apache is a bit broken now.  The only
> content that comes up are for www.computerking.ca site. ie if i point
> browser at www.computerking.ca everthing works fine.  If i point my
> browser at blazebartending.com i still get the www.computerking.ca
> content. I know the default behavior for apache is to use the first
> vhost listed if it cannot find an apporpatly named site.  But why is
> it doing this to me?
> >
> > [root@shoemasters conf.v]# /usr/sbin/apachectl -S
> > VirtualHost configuration:
> > wildcard NameVirtualHosts and _default_ servers:
> > *:*                    www.computerking.ca
> (/etc/httpd/conf.v/computerking.ca:4)
> > *:80                   is a NameVirtualHost
> >          default server mail.computerking.ca
> (/etc/httpd/conf.v/computerking.ca:19)
> >          port 80 namevhost mail.computerking.ca
> (/etc/httpd/conf.v/computerking.ca:19)
> 
> snip...
> 
> I suspect you have somewhere in /etc/httpd/conf.v/computerking.ca
> something like this:
> 
> <VirtualHost *:*>
> 
> ServerName www.computerking.ca
> ...
> </VirtualHost>
> 
> What hapens if you change that to
> <VirtualHost *:80> ?
> 
Thanks had <virtualhost *> solved everything. must have taken priority over all the other vhosts.  

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] virtual server problems SOLVED

Posted by Krist van Besien <kr...@gmail.com>.
On 3/20/06, RYAN M. vAN GINNEKEN <lu...@computerking.ca> wrote:
>
> ----- Krist van Besien <kr...@gmail.com> wrote:
> > On 3/20/06, RYAN M. vAN GINNEKEN <lu...@computerking.ca> wrote:

> > I suspect you have somewhere in /etc/httpd/conf.v/computerking.ca
> > something like this:
> >
> > <VirtualHost *:*>
> >
> > ServerName www.computerking.ca
> > ...
> > </VirtualHost>
> >
> > What hapens if you change that to
> > <VirtualHost *:80> ?
> >
> Thanks had <virtualhost *> solved everything. must have taken priority over all the other vhosts.

If you look at the apache docs at:

http://httpd.apache.org/docs/2.0/mod/core.html#namevirtualhost

it says there:

"Note that the argument to the <VirtualHost> directive must exactly
match the argument to the NameVirtualHost directive."

That was the error here. Because the parameters didn't match you
created (unintentionally) an IP based Virtual Host that because of the
wildcard grabbed everything.

Krist

--
krist.vanbesien@gmail.com
Solothurn, Switzerland

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org