You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2010/04/07 14:22:52 UTC

svn commit: r931520 - in /httpd/httpd/trunk/docs/manual/vhosts: details.html.en details.xml mass.html.en mass.xml

Author: rbowen
Date: Wed Apr  7 12:22:52 2010
New Revision: 931520

URL: http://svn.apache.org/viewvc?rev=931520&view=rev
Log:
Comparnisions to Apache 1.3 aren't terribly helpful.

Modified:
    httpd/httpd/trunk/docs/manual/vhosts/details.html.en
    httpd/httpd/trunk/docs/manual/vhosts/details.xml
    httpd/httpd/trunk/docs/manual/vhosts/mass.html.en
    httpd/httpd/trunk/docs/manual/vhosts/mass.xml

Modified: httpd/httpd/trunk/docs/manual/vhosts/details.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/vhosts/details.html.en?rev=931520&r1=931519&r2=931520&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/vhosts/details.html.en (original)
+++ httpd/httpd/trunk/docs/manual/vhosts/details.html.en Wed Apr  7 12:22:52 2010
@@ -25,26 +25,22 @@
 </div>
 
 
-    <p>The virtual host code was completely rewritten in
-    <strong>Apache 1.3</strong>. This document attempts to explain
-    exactly what Apache does when deciding what virtual host to
-    serve a hit from. With the help of the new
-    <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code>
-    directive virtual host configuration should be a lot easier and
-    safer than with versions prior to 1.3.</p>
+    <p>This document attempts to explain
+    exactly what Apache HTTP Server does when deciding what virtual host to
+    serve a request from.</p>
 
     <p>If you just want to <cite>make it work</cite> without
     understanding how, here are <a href="examples.html">some
     examples</a>.</p>
 
 </div>
-<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#configparsing">Config File Parsing</a></li>
+<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#configparsing">Configuration File Parsing</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#hostmatching">Virtual Host Matching</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#tips">Tips</a></li>
 </ul></div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
-<h2><a name="configparsing" id="configparsing">Config File Parsing</a></h2>
+<h2><a name="configparsing" id="configparsing">Configuration File Parsing</a></h2>
 
     <p>There is a <em>main_server</em> which consists of all the
     definitions appearing outside of
@@ -53,17 +49,15 @@
     <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>
     sections.</p>
 
-    <p>The directives
-    <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> and
-    <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> 
-    can appear anywhere within the definition of a server. However,
+    <p>The 
+    <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> directive
+    may appear anywhere within the definition of a server. However,
     each appearance overrides the previous appearance (within that
     server).</p>
 
     <p>The main_server has no default
-    <code>ServerPath</code>, or <code>ServerAlias</code>. The
-    default <code>ServerName</code> is deduced from the server's IP
-    address.</p>
+    <code>ServerAlias</code>. The default <code>ServerName</code>, 
+    if not specified, is deduced from the server's IP address.</p>
 
     <p>Port numbers specified in the <code>VirtualHost</code> directive do
     not influence what port numbers Apache will listen on, they only discriminate between
@@ -280,15 +274,10 @@
 
     <p>If the client submitted a HTTP/1.0 request without
     <code>Host:</code> header field we don't know to what server
-    the client tried to connect and any existing
-    <code>ServerPath</code> is matched against the URI from the
-    request. The first matching path on the list is used and the
-    request is served from that vhost.</p>
-
-    <p>If no matching vhost could be found the request is served
-    from the first vhost with a matching port number that is on the
-    list for the IP to which the client connected (as already
-    mentioned before).</p>
+    the client tried to connect to. In this case, the first virtual host
+    (that is, the one listed first in the server configuration file) for
+    the IP address and port to which the client connected, is
+    used to serve this request.</p>
 
     
 
@@ -326,7 +315,7 @@
       corresponding address set which must be defined with a
       <code>NameVirtualHost</code> directive.</li>
 
-      <li><code>ServerAlias</code> and <code>ServerPath</code>
+      <li><code>ServerAlias</code>
       checks are never performed for an IP-based vhost.</li>
 
       <li>The order of name-/IP-based, the <code>_default_</code>
@@ -341,13 +330,6 @@
       matching process. Apache always uses the real port to which
       the client sent the request.</li>
 
-      <li>If a <code>ServerPath</code> directive exists which is a
-      prefix of another <code>ServerPath</code> directive that
-      appears later in the configuration file, then the former will
-      always be matched and the latter will never be matched. (That
-      is assuming that no <code>Host:</code> header field was
-      available to disambiguate the two.)</li>
-
       <li>If two IP-based vhosts have an address in common, the
       vhost appearing first in the config file is always matched.
       Such a thing might happen inadvertently. The server will give
@@ -412,13 +394,6 @@
       <li>Group corresponding <code>NameVirtualHost</code> and
       <code>VirtualHost</code> definitions in your configuration to
       ensure better readability.</li>
-
-      <li>Avoid <code>ServerPaths</code> which are prefixes of
-      other <code>ServerPaths</code>. If you cannot avoid this then
-      you have to ensure that the longer (more specific) prefix
-      vhost appears earlier in the configuration file than the
-      shorter (less specific) prefix (<em>i.e.</em>, "ServerPath
-      /abc" should appear after "ServerPath /abc/def").</li>
     </ul>
 
 </div></div>

Modified: httpd/httpd/trunk/docs/manual/vhosts/details.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/vhosts/details.xml?rev=931520&r1=931519&r2=931520&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/vhosts/details.xml (original)
+++ httpd/httpd/trunk/docs/manual/vhosts/details.xml Wed Apr  7 12:22:52 2010
@@ -26,13 +26,9 @@
 
 <summary>
 
-    <p>The virtual host code was completely rewritten in
-    <strong>Apache 1.3</strong>. This document attempts to explain
-    exactly what Apache does when deciding what virtual host to
-    serve a hit from. With the help of the new
-    <directive module="core">NameVirtualHost</directive>
-    directive virtual host configuration should be a lot easier and
-    safer than with versions prior to 1.3.</p>
+    <p>This document attempts to explain
+    exactly what Apache HTTP Server does when deciding what virtual host to
+    serve a request from.</p>
 
     <p>If you just want to <cite>make it work</cite> without
     understanding how, here are <a href="examples.html">some
@@ -40,7 +36,7 @@
 
 </summary>
 
-<section id="configparsing"><title>Config File Parsing</title>
+<section id="configparsing"><title>Configuration File Parsing</title>
 
     <p>There is a <em>main_server</em> which consists of all the
     definitions appearing outside of
@@ -49,17 +45,15 @@
     <directive type="section" module="core">VirtualHost</directive>
     sections.</p>
 
-    <p>The directives
-    <directive module="core">ServerName</directive> and
-    <directive module="core">ServerPath</directive> 
-    can appear anywhere within the definition of a server. However,
+    <p>The 
+    <directive module="core">ServerName</directive> directive
+    may appear anywhere within the definition of a server. However,
     each appearance overrides the previous appearance (within that
     server).</p>
 
     <p>The main_server has no default
-    <code>ServerPath</code>, or <code>ServerAlias</code>. The
-    default <code>ServerName</code> is deduced from the server's IP
-    address.</p>
+    <code>ServerAlias</code>. The default <code>ServerName</code>, 
+    if not specified, is deduced from the server's IP address.</p>
 
     <p>Port numbers specified in the <code>VirtualHost</code> directive do
     not influence what port numbers Apache will listen on, they only discriminate between
@@ -276,15 +270,10 @@
 
     <p>If the client submitted a HTTP/1.0 request without
     <code>Host:</code> header field we don't know to what server
-    the client tried to connect and any existing
-    <code>ServerPath</code> is matched against the URI from the
-    request. The first matching path on the list is used and the
-    request is served from that vhost.</p>
-
-    <p>If no matching vhost could be found the request is served
-    from the first vhost with a matching port number that is on the
-    list for the IP to which the client connected (as already
-    mentioned before).</p>
+    the client tried to connect to. In this case, the first virtual host
+    (that is, the one listed first in the server configuration file) for
+    the IP address and port to which the client connected, is
+    used to serve this request.</p>
 
     </section>
 
@@ -322,7 +311,7 @@
       corresponding address set which must be defined with a
       <code>NameVirtualHost</code> directive.</li>
 
-      <li><code>ServerAlias</code> and <code>ServerPath</code>
+      <li><code>ServerAlias</code>
       checks are never performed for an IP-based vhost.</li>
 
       <li>The order of name-/IP-based, the <code>_default_</code>
@@ -337,13 +326,6 @@
       matching process. Apache always uses the real port to which
       the client sent the request.</li>
 
-      <li>If a <code>ServerPath</code> directive exists which is a
-      prefix of another <code>ServerPath</code> directive that
-      appears later in the configuration file, then the former will
-      always be matched and the latter will never be matched. (That
-      is assuming that no <code>Host:</code> header field was
-      available to disambiguate the two.)</li>
-
       <li>If two IP-based vhosts have an address in common, the
       vhost appearing first in the config file is always matched.
       Such a thing might happen inadvertently. The server will give
@@ -409,13 +391,6 @@
       <li>Group corresponding <code>NameVirtualHost</code> and
       <code>VirtualHost</code> definitions in your configuration to
       ensure better readability.</li>
-
-      <li>Avoid <code>ServerPaths</code> which are prefixes of
-      other <code>ServerPaths</code>. If you cannot avoid this then
-      you have to ensure that the longer (more specific) prefix
-      vhost appears earlier in the configuration file than the
-      shorter (less specific) prefix (<em>i.e.</em>, "ServerPath
-      /abc" should appear after "ServerPath /abc/def").</li>
     </ul>
 
 </section>

Modified: httpd/httpd/trunk/docs/manual/vhosts/mass.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/vhosts/mass.html.en?rev=931520&r1=931519&r2=931520&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/vhosts/mass.html.en (original)
+++ httpd/httpd/trunk/docs/manual/vhosts/mass.html.en Wed Apr  7 12:22:52 2010
@@ -109,7 +109,7 @@ NameVirtualHost 111.22.33.44
     pathname of the file that is used to satisfy the request. This
     can be most easily done by using <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code> 
     with Apache httpd. Alternatively, 
-    <a href="../rewrite/vhosts.html"><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> can 
+    <a href="../rewrite/vhosts.html">mod_rewrite can 
     be used</a>.</p>
     <p>Both of these modules are disabled by default; you must enable
     one of them when configuring and building Apache httpd if you want to
@@ -134,7 +134,7 @@ NameVirtualHost 111.22.33.44
     <code>ServerName</code> is used instead.</p>
 
     <p>The other thing to determine is the document root (configured
-    with <code>DocumentRoot</code> and available to CGIs via the
+    with <code>DocumentRoot</code> and available to CGI scripts via the
     <code>DOCUMENT_ROOT</code> environment variable). In a normal
     configuration, this is used by the core module when
     mapping URIs to filenames, but when the server is configured to
@@ -173,7 +173,9 @@ VirtualScriptAlias  /www/hosts/%0/cgi-bi
     hosting solution by just turning <code>UseCanonicalName
     Off</code> into <code>UseCanonicalName DNS</code>. The server
     name that is inserted into the filename is then derived from
-    the IP address of the virtual host.</p>
+    the IP address of the virtual host. The variable <code>%0</code>
+    references the requested servername, as indicated in the
+    <code>Host:</code> header.</p>
 
 <p>See the <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code> documentation for more usage
 examples.</p>
@@ -183,8 +185,8 @@ examples.</p>
 <h2><a name="homepages" id="homepages">Simplified Dynamic Virtual Hosts</a></h2>
 
     <p>This is an adjustment of the above system, tailored for an
-    ISP's homepages server. Using a slightly more complicated
-    configuration, we can select substrings of the server name to
+    ISP's web hosting server. Using <code>%2</code>,
+    we can select substrings of the server name to
     use in the filename so that, for example, the documents for
     <code>www.user.isp.com</code> are found in
     <code>/home/user/www</code>. It uses a single <code>cgi-bin</code>

Modified: httpd/httpd/trunk/docs/manual/vhosts/mass.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/vhosts/mass.xml?rev=931520&r1=931519&r2=931520&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/vhosts/mass.xml (original)
+++ httpd/httpd/trunk/docs/manual/vhosts/mass.xml Wed Apr  7 12:22:52 2010
@@ -102,7 +102,7 @@ NameVirtualHost 111.22.33.44
     pathname of the file that is used to satisfy the request. This
     can be most easily done by using <module>mod_vhost_alias</module> 
     with Apache httpd. Alternatively, 
-    <a href="../rewrite/vhosts.html"><module>mod_rewrite</module> can 
+    <a href="../rewrite/vhosts.html">mod_rewrite can 
     be used</a>.</p>
     <p>Both of these modules are disabled by default; you must enable
     one of them when configuring and building Apache httpd if you want to
@@ -128,7 +128,7 @@ NameVirtualHost 111.22.33.44
     <code>ServerName</code> is used instead.</p>
 
     <p>The other thing to determine is the document root (configured
-    with <code>DocumentRoot</code> and available to CGIs via the
+    with <code>DocumentRoot</code> and available to CGI scripts via the
     <code>DOCUMENT_ROOT</code> environment variable). In a normal
     configuration, this is used by the core module when
     mapping URIs to filenames, but when the server is configured to
@@ -168,7 +168,9 @@ VirtualScriptAlias  /www/hosts/%0/cgi-bi
     hosting solution by just turning <code>UseCanonicalName
     Off</code> into <code>UseCanonicalName DNS</code>. The server
     name that is inserted into the filename is then derived from
-    the IP address of the virtual host.</p>
+    the IP address of the virtual host. The variable <code>%0</code>
+    references the requested servername, as indicated in the
+    <code>Host:</code> header.</p>
 
 <p>See the <module>mod_vhost_alias</module> documentation for more usage
 examples.</p>
@@ -178,8 +180,8 @@ examples.</p>
 <section id="homepages"><title>Simplified Dynamic Virtual Hosts</title>
 
     <p>This is an adjustment of the above system, tailored for an
-    ISP's homepages server. Using a slightly more complicated
-    configuration, we can select substrings of the server name to
+    ISP's web hosting server. Using <code>%2</code>,
+    we can select substrings of the server name to
     use in the filename so that, for example, the documents for
     <code>www.user.isp.com</code> are found in
     <code>/home/user/www</code>. It uses a single <code>cgi-bin</code>