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 noodl: http://wiki.apache.org/httpd/Recipes/CanonicalHostNames The comment on the change is: Removed confusing comment (default vhost not relevant to example) ------------------------------------------------------------------------------ NameVirtualHost *:80 <VirtualHost *:80> - # First virtual host is the default - # This will catch any hostnames not listed, such as: - # localhost, IP address, example.net, example.com, etc. + # Canonical host + ServerName www.example.com + DocumentRoot /usr/local/apache/htdocs + </VirtualHost> + + <VirtualHost *:80> + # Non-canonical names for the above vhost ServerName www.example.net ServerAlias example.com Redirect permanent / http://www.example.com/ - </VirtualHost> - - <VirtualHost *:80> - # Canonical host - ServerName www.example.com - DocumentRoot /usr/local/apache/htdocs </VirtualHost> }}}
