]> granicus.if.org Git - apache/commitdiff
rebuild
authorDaniel Gruno <humbedooh@apache.org>
Sat, 12 May 2012 08:10:14 +0000 (08:10 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Sat, 12 May 2012 08:10:14 +0000 (08:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1337477 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_vhost_alias.html.en
docs/manual/mod/mod_vhost_alias.xml.tr

index 65a3eeded24daf9f63b52d6138ec67c080f1dab1..9657cb5788b5d74c79d62c8650cc8fd67da5b07f 100644 (file)
@@ -193,6 +193,26 @@ VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2
     <p>The example request would come from
     <code>/usr/local/apache/vhosts/example.com/d/o/m/ain/directory/file.html</code>.</p>
 
+<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>sub.www.domain.example.com</code>
+ instead of simply <code>www.domain.example.com</code>, then using %3+ will result in the document
+root being <code>/usr/local/apache/vhosts/domain.example.com/...</code> instead of the
+intended <code>example.com</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>example.com</code> regardless of the number of subdomains appended 
+to the hostname. As such, one can make a configuration that will direct all first, second 
+or third level subdomains to the same directory:
+</p>
+<pre class="prettyprint lang-config">
+    VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0"
+</pre>
+
+<p>
+In the example above, both <code>www.example.com</code> as well as <code>www.sub.example.com</code>
+or <code>example.com</code> will all point to <code>/usr/local/apache/vhosts/example.com</code>.
+</p>
+
     <p>For IP-based virtual hosting you might use the following in
     your configuration file:</p>
 
index 7cae3031b2a7d302ec73ca0a8f681f8d79c51603..a0e2801c9e6bfd0e40ba027702af12b15b227556 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
-<!-- English Revision: 1326699:1334026 (outdated) -->
+<!-- English Revision: 1326699:1337476 (outdated) -->
 <!-- =====================================================
  Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
    Reviewed by: Orhan Berent <berent belgeler.org>