l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Apr 11 13:28

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] apache question: virtualhost not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] apache question: virtualhost not working

På söndag, 11 april 2004, skrev Rod Roark:
> On Sunday 11 April 2004 07:04 am, Peter Jay Salzman wrote:
> ...
> >    NameVirtualHost
> > 
> >    <VirtualHost www.liberal.ws:80>
> >       ServerAdmin p@dirac.org
> >       DocumentRoot /home/p/linux
> >       ServerName www.liberal.ws
> >       ErrorLog /var/log/apache/test_error
> >       LogLevel warn
> >       CustomLog /var/log/apache/test_access common
> >    </VirtualHost>
> What works for me looks like this:
>    NameVirtualHost
>    <VirtualHost>
>       etc.

Rod is right; you need the NameVirtualHost directive when virtual hosts share
the same IP address (i.e., there are multiple DNS A records for your the IP
address of your server, or there are CNAME records giving it additional

I have DNS names, not IP addresses, in my declarations of NameVirtualHost and
VirtualHost. It seems to work fine either way.

There is another technique for virtual hosts, now little used, involving a
different IP address for each virtual host. For example, bar.foo.org might be
served via eth0, while baz.foo.org via eth0:1. In this case you do not need
the NameVirtualHost directive. I have used this method; it was useful back
when some browsers did not support virtual hosts and when static IP addresses
were not so scarce.

Henry House
The unintelligible text that may follow is a digital signature. 
See <http://hajhouse.org/pgp> for information.  My OpenPGP key:

Attachment: signature.asc
Description: Digital signature

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.