httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] Virtual Hosts
Date Thu, 14 Nov 2002 08:15:08 GMT
This looks very good - as Christopher points out "ServerAlias" is
redundant. Usually, you use this directive if you have two domain names
pointing to the same site, e.g. two variations of spelling, like:


In the directory container, you have "AllowOverride" - I presume this
means you have a ".htaccess" file in the directory and that you want to
allow this file to define the password access mechanism (AuthConfig),
directory options (Options) and document types (FileInfo)... If so, you
know more about apache than you're letting on :-)

As a final note, personally, I think it's a great idea to use virtual
host containers even if you have only one site (as you have done). It
makes things very clear and means that the httpd.conf is immediately
scaleable if you want to add another site. I take it you do understand
that you can add additional sites to this config by creating new VH
containers with different docroots... The simplest are name-based where
you just put "NameVirtualHost *" before and outside any VH containers
and then make any number of VHs with different ServerNames. Apache will
then select the appropriate site using the server name in the user's

Good Luck!

OWen Boyle

>-----Original Message-----
>From: Evje []
>Sent: Donnerstag, 14. November 2002 02:51
>Subject: [users@httpd] Virtual Hosts
>   New to Apache and would like to know if the following example is the
>correct way to configure Virtual Host and Directory. It works, but is
>there a better way to do it?
><VirtualHost *>
>     ServerAdmin
>     DocumentRoot "C:/Apache2/htdocs/mydirectory"
>     ServerName
>     ServerAlias
>     ErrorLog  logs/
>     CustomLog logs/ common
>     <Directory "C:/Apache2/htdocs/mydirectory">
>     Options Indexes
>     AllowOverride AuthConfig Options Fileinfo
>     Order Allow,Deny
>     Allow from all
>     </Directory>
>Thanks in advance for the help.   Selmer Ausland
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message