]> granicus.if.org Git - apache/commitdiff
Merge r1301398, r1301399 from trunk:
authorEric Covener <covener@apache.org>
Fri, 16 Mar 2012 09:47:02 +0000 (09:47 +0000)
committerEric Covener <covener@apache.org>
Fri, 16 Mar 2012 09:47:02 +0000 (09:47 +0000)
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.

xforms

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1301400 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/core.html.en
docs/manual/mod/core.xml
docs/manual/vhosts/name-based.html.en
docs/manual/vhosts/name-based.xml

index 8582d308761cafd65fb2b7b5a99ef31ddf816e91..123c3b7c4cf43dcc8c9dbd4e277124cb1accc928 100644 (file)
@@ -3755,6 +3755,10 @@ to name-virtual hosts</td></tr>
       &lt;/VirtualHost&gt;
     </code></p></div>
 
+    <p>Name-based virtual hosts for the best-matching set of  <code class="directive"><a href="#virtualhost">&lt;virtualhost&gt;</a></code>s are processsed
+    in the order they appear in the configuration.  The first matching <code class="directive"><a href="#servername">ServerName</a></code> or <code class="directive"><a href="#serveralias">ServerAlias</a></code> is used, with no different precedence for wildcards
+    (nor for ServerName vs. ServerAlias).  </p>
+
 <h3>See also</h3>
 <ul>
 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
index ef60f2f2689bcf3dd791d59849311175d0f2b56a..d877a7c1b6ab8466ec00265ba0d1a0a37715edbd 100644 (file)
@@ -3746,6 +3746,13 @@ to name-virtual hosts</description>
       # ...<br />
       &lt;/VirtualHost&gt;
     </example>
+
+    <p>Name-based virtual hosts for the best-matching set of  <directive
+    type="section" module="core">virtualhost</directive>s are processsed
+    in the order they appear in the configuration.  The first matching <directive
+    module="core">ServerName</directive> or <directive module="core"
+    >ServerAlias</directive> is used, with no different precedence for wildcards
+    (nor for ServerName vs. ServerAlias).  </p>
 </usage>
 <seealso><directive module="core">UseCanonicalName</directive></seealso>
 <seealso><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
index b5de7a061d539ddcaf4c4234414127c8e067a1b7..6223539df8eed9644915abc5bfa65e1ed94c3309 100644 (file)
         <span class="indent">
             # This first-listed virtual host is also the default for *:80
             ServerName www.example.com<br />
-            ServerAlias example.com *.example.com<br />
+            ServerAlias example.com <br />
             DocumentRoot /www/domain<br />
         </span>
         &lt;/VirtualHost&gt;<br />
     first have your DNS server properly configured to map those names to an IP
     address associated with your server.</p>
 
+    <p>Name-based virtual hosts for the best-matching set of  <code class="directive"><a href="../mod/core.html#virtualhost">&lt;virtualhost&gt;</a></code>s are processsed 
+    in the order they appear in the configuration.  The first matching <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> or <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> is used, with no different precedence for wildcards
+    (nor for ServerName vs. ServerAlias).  </p>
+
     <p>Finally, you can fine-tune the configuration of the virtual hosts
     by placing other directives inside the <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> containers. Most directives can be
     placed in these containers and will then change the configuration only of
index da8598e248192efc9512a25516b1755d13124d88..63ae0efab25a3a083cc824c761a8ce9d88ef826e 100644 (file)
         <indent>
             # This first-listed virtual host is also the default for *:80
             ServerName www.example.com<br />
-            ServerAlias example.com *.example.com<br />
+            ServerAlias example.com <br />
             DocumentRoot /www/domain<br />
         </indent>
         &lt;/VirtualHost&gt;<br />
     first have your DNS server properly configured to map those names to an IP
     address associated with your server.</p>
 
+    <p>Name-based virtual hosts for the best-matching set of  <directive
+    type="section" module="core">virtualhost</directive>s are processsed 
+    in the order they appear in the configuration.  The first matching <directive
+    module="core">ServerName</directive> or <directive module="core"
+    >ServerAlias</directive> is used, with no different precedence for wildcards
+    (nor for ServerName vs. ServerAlias).  </p>
+
     <p>Finally, you can fine-tune the configuration of the virtual hosts
     by placing other directives inside the <directive type="section"
     module="core">VirtualHost</directive> containers. Most directives can be