From c2f29eef976afb033b7d15fb1746debcd0972339 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Fri, 16 Mar 2012 09:45:01 +0000 Subject: [PATCH] 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 --- docs/manual/mod/core.xml | 7 +++++++ docs/manual/vhosts/name-based.xml | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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 -- 2.40.0