httpd-wiki-changes mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Httpd Wiki] Update of "Recipes/CanonicalHostNames" by slive
Date Sat, 03 Feb 2007 21:29:44 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.

The following page has been changed by slive:
http://wiki.apache.org/httpd/Recipes/CanonicalHostNames

The comment on the change is:
Try to clarify the default host issue.

------------------------------------------------------------------------------
  
  == Using Virtual Hosts ==
  
+ Use the Redirect directive inside a VirtualHost block to force browsers to redo a request
with a new host name.
+ 
+ Remember that the first listed VirtualHost will serve all requests that match no ServerName
or ServerAlias.  By using a Redirect in this host, you can assure that any non-matched names
will also be transfered to the Canonical host.
+ 
  {{{
+ 
  NameVirtualHost *:80
  
  <VirtualHost *:80>
-   # The first-listed <VirtualHost> is the default host that catches all the
-   # names specified in its ServerName/ServerAlias, plus all the names
-   # that are not listed in any other <VirtualHost>, and redirects
-   # them to the canonical <VirtualHost> below.
    ServerName www.example.net
    ServerAlias example.com
    Redirect permanent / http://www.example.com/

Mime
View raw message