httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1337476 - /httpd/httpd/branches/2.4.x/docs/manual/mod/mod_vhost_alias.xml
Date Sat, 12 May 2012 08:09:04 GMT
Author: humbedooh
Date: Sat May 12 08:09:04 2012
New Revision: 1337476

Backport changes from trunk


Modified: httpd/httpd/branches/2.4.x/docs/manual/mod/mod_vhost_alias.xml
--- httpd/httpd/branches/2.4.x/docs/manual/mod/mod_vhost_alias.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/mod/mod_vhost_alias.xml Sat May 12 08:09:04 2012
@@ -171,6 +171,25 @@ VirtualDocumentRoot /usr/local/apache/vh
     <p>The example request would come from
+<p> A very common request by users is the ability to point multiple domains to multiple

+document roots without having to worry about the length or number of parts of the 
+hostname being requested. If the requested hostname is <code></code>
+ instead of simply <code></code>, then using %3+ will result
in the document
+root being <code>/usr/local/apache/vhosts/</code> instead
of the
+intended <code></code> directory. In such cases, it can be beneficial
to use 
+the combination <code>%-2.0.%-1.0</code>, which will always yield the domain
name and the 
+tld, for example <code></code> regardless of the number of subdomains
+to the hostname. As such, one can make a configuration that will direct all first, second

+or third level subdomains to the same directory:
+<highlight language="config">
+    VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0"
+In the example above, both <code></code> as well as <code></code>
+or <code></code> will all point to <code>/usr/local/apache/vhosts/</code>.
     <p>For IP-based virtual hosting you might use the following in
     your configuration file:</p>

View raw message