Apache Help

Bob Stocker bstocker at bloodtip.org
Fri Mar 1 04:17:51 CST 2002


On Thu, 2002-02-28 at 21:36, Michael Pratt wrote:
> This is Driving me bonkers!  IF I get rid od the primary website out of the
> virtual directory It works but if I add it back in all that comes up on both
> Domains it the Primary domain!!! UUUUUUHHHHHHHG!!!!! :((((((
> 
> Mike

Hi there,
You're using the VirtualHost directive incorrectly.
The form should be <VirtualHost [IP address]> rather than <VirtualHost
[hostname]>.  So, for your purposes you could do <VirtualHost *> or
<VirtualHost [DSL IP address]> for each of your virtual hosts.
>From http://httpd.apache.org/docs-2.0/vhosts/name-based.html :
"Now when a request arrives, the server will first check if it is using
an IP address that matches the NameVirtualHost. If it is, then it will
look at each <VirtualHost> section with a matching IP address and try to
find one where the ServerName or ServerAlias matches the requested
hostname. If it finds one, then it uses the configuration for that
server. If no matching virtual host is found, then the first listed
virtual host that matches the IP address will be used."

Good luck,
Bob

> ----- Original Message -----
> From: "Brian Densmore" <DensmoreB at ctbsonline.com>
> To: <mtpratt at swbell.net>; <kclug at kclug.org>
> Sent: Thursday, February 28, 2002 12:21 PM
> Subject: RE: Apache Help
> 
> 
> > Mike,
> >
> >   What does your: listen , bindaddress, usecanonicalname,
> > hostnamelookups lines look like?  Also what about the directory settings
> > lines. You might try adding a document root line in each of the virtual
> > domains.
> >
> > brian
> > > -----Original Message-----
> > > From: Michael Pratt [mailto:mtpratt1971 at hotmail.com]
> > > Sent: Thursday, February 28, 2002 11:56 AM
> > > To: kclug at kclug.org
> > > Subject: Apache Help
> > >
> > >
> > > I am trying to set up multiple domains using one IP  I have
> > > this in my
> > > httpd.conf
> > >
> > > NameVirtualHost <DSL IP ADDRESS>
> > >
> > > <VirtualHost domain1.net>
> > > DocumentRoot /var/www/html
> > > ServerName domain1.net
> > > </VirtualHost>
> > >
> > > <VirtualHost domain2.org>
> > > DocumentRoot /var/www/html/domain2
> > > ServerName domain2.org
> > > </VirtualHost>
> > >
> > > The problem I have is no matter what domain I put in it goes
> > > to domain1.net
> > >
> > > how can I set Apache up to point Domain1 to /var/www/html and
> > > Domain2 to
> > > /var/www/html/domain2?
> > >
> > >
> > > Thanks!
> > >
> > > Mike
> > >
> > > _________________________________________________________________
> > > MSN Photos is the easiest way to share and print your photos:
> > > http://photos.msn.com/support/worldwide.aspx
> > >
> > >
> > >
> > > majordomo at kclug.org
> > >
> >
> >
> 
> 
> 




More information about the Kclug mailing list