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/

Reply via email to