From: Eric Covener Date: Fri, 16 Mar 2012 09:45:01 +0000 (+0000) Subject: fix a misleading example that implies ServerName has precedence over a ServerAlias. X-Git-Tag: 2.5.0-alpha~7355 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2f29eef976afb033b7d15fb1746debcd0972339;p=apache fix a misleading example that implies ServerName has precedence over a ServerAlias. We stop when a vhost matches for any reason (not 2.4 specific). Mention this explicitly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1301398 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index ae6f147957..f8147140cf 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -3777,6 +3777,13 @@ to name-virtual hosts # ...
</VirtualHost> + +

Name-based virtual hosts for the best-matching set of virtualhosts are processsed + in the order they appear in the configuration. The first matching ServerName or ServerAlias is used, with no different precedence for wildcards + (nor for ServerName vs. ServerAlias).

UseCanonicalName Apache HTTP Server Virtual Host documentation diff --git a/docs/manual/vhosts/name-based.xml b/docs/manual/vhosts/name-based.xml index da8598e248..63ae0efab2 100644 --- a/docs/manual/vhosts/name-based.xml +++ b/docs/manual/vhosts/name-based.xml @@ -132,7 +132,7 @@ # This first-listed virtual host is also the default for *:80 ServerName www.example.com
- ServerAlias example.com *.example.com
+ ServerAlias example.com
DocumentRoot /www/domain
</VirtualHost>
@@ -171,6 +171,13 @@ first have your DNS server properly configured to map those names to an IP address associated with your server.

+

Name-based virtual hosts for the best-matching set of virtualhosts are processsed + in the order they appear in the configuration. The first matching ServerName or ServerAlias is used, with no different precedence for wildcards + (nor for ServerName vs. ServerAlias).

+

Finally, you can fine-tune the configuration of the virtual hosts by placing other directives inside the VirtualHost containers. Most directives can be