httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
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:

ServerName www.theatre.com
ServerAlias www.theater.com

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
request.

Good Luck!

OWen Boyle


>-----Original Message-----
>From: Evje [mailto:sel.ausland@shawcable.com]
>Sent: Donnerstag, 14. November 2002 02:51
>To: users@httpd.apache.org
>Subject: [users@httpd] Virtual Hosts
>
>
>Hello;
>   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 admin@xyz.com
>     DocumentRoot "C:/Apache2/htdocs/mydirectory"
>     ServerName www.xyz.com
>     ServerAlias www.xyz.com
>     ErrorLog  logs/xyz.com-error_log
>     CustomLog logs/xyz.com-access_log common
>
>     <Directory "C:/Apache2/htdocs/mydirectory">
>     Options Indexes
>     AllowOverride AuthConfig Options Fileinfo
>     Order Allow,Deny
>     Allow from all
>     </Directory>
></VirtualHost>
>
>Thanks in advance for the help.   Selmer Ausland
>
>--
>
>---------------------------------------------------------------------
>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
>
>

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: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


Mime
View raw message