[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: VirtualHosts



On Wed, Apr 04, 2001 at 04:08:34PM +1000, Jeff Waugh wrote:
> <quote who="Y2KNET">
> 
> > Listen 192.55.34.5:80
> > NameVirtualHost  192.55.34.5:80
> > 
> > <VirtualHost 192.241.171.5:80>
> > DocumentRoot /var/www/xyz
> > ServerName www.xyz.net
> > </VirtualHost>
> 
> NameVirtualHost means that you're defining the virtual hosts by name. Change
> the VirtualHost line to read:
> 
> <VirtualHost xyz.net>
> 
> And make sure you use:
> 
> ServerName xyz.net
> ServerAlias www.xyz.net
> 
> Otherwise people like me get very cranky. :)

No, NameVirtualHost does _not_ mean that you have to use the fqdn of
the vhost in the Virtualhost directive - in fact, it's confusing if
you do.

What NameVirtualHost means to apache is that it should use the HTTP
variable "ServerName" to determine which vhost is being accessed.

-- 
Nathan Norman - Staff Engineer | A good plan today is better
Micromuse Ltd.                 | than a perfect plan tomorrow.
mailto:nnorman@micromuse.com   |   -- Patton

Attachment: pgpw4cydbsQu3.pgp
Description: PGP signature


Reply to: