]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport r1746754
authorChristophe Jaillet <jailletc36@apache.org>
Sun, 5 Jun 2016 08:06:46 +0000 (08:06 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sun, 5 Jun 2016 08:06:46 +0000 (08:06 +0000)
Synch with trunk, merge r1628690

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

docs/manual/mod/core.xml
docs/manual/vhosts/examples.xml

index 4ea46bb3d995340be1c57582064bb594218fa034..7fa1b42287584a44d889fe72f9ac73c47eb5103b 100644 (file)
@@ -3944,7 +3944,8 @@ to name-virtual hosts</description>
     >ServerAlias</directive> is used, with no different precedence for wildcards
     (nor for ServerName vs. ServerAlias).  </p>
 
-    <p>The complete list of names in the <directive>VirtualHost</directive>
+    <p>The complete list of names in the <directive type="section" module="core"
+    >VirtualHost</directive>
     directive are treated just like a (non wildcard) 
     <directive>ServerAlias</directive>.</p>
 
@@ -3967,13 +3968,13 @@ itself</description>
     </p>
 
     <p><directive>ServerName</directive> is used (possibly
-    in conjunction with <directive>ServerAlias</directive>) to uniquely
+    in conjunction with <directive module="core">ServerAlias</directive>) to uniquely
     identify a virtual host, when using <a
     href="../vhosts/name-based.html">name-based virtual hosts</a>.</p>
 
     <p>Additionally, this is used when
     creating self-referential redirection URLs when 
-    <directive>UseCanonicalName</directive> is set to a non-default
+    <directive module="core">UseCanonicalName</directive> is set to a non-default
     value.</p>
 
     <p>For example, if the name of the
index 44540348e68e0e279131ccc4daca2cc9f0ec2a25..6a87b7842e53b7afc436921898e29963b7878e64 100644 (file)
   <section id="purename"><title>Running several name-based web
     sites on a single IP address.</title>
 
-    <p>Your server has a single IP address, and multiple aliases (CNAMES)
-    point to this machine in DNS. You want to run a web server for
-    <code>www.example.com</code> and <code>www.example.org</code> on this
-    machine.</p>
+    <p>Your server has multiple hostnames that resolve to a single address,
+    and you want to respond differently for <code>www.example.com</code>
+    and <code>www.example.org</code>.</p>
 
     <note><title>Note</title><p>Creating virtual
           host configurations on your Apache server does not magically
@@ -59,7 +58,7 @@ Listen 80
 &lt;VirtualHost *:80&gt;
     DocumentRoot "/www/example1"
     ServerName www.example.com
-  
+
     # Other directives here
 &lt;/VirtualHost&gt;
 
@@ -77,15 +76,21 @@ Listen 80
     in the configuration file, it has the highest priority and can be seen
     as the <cite>default</cite> or <cite>primary</cite> server. That means
     that if a request is received that does not match one of the specified
-    <code>ServerName</code> directives, it will be served by this first
-    <code>VirtualHost</code>.</p>
+    <directive module="core">ServerName</directive> directives, it will be served by this first
+    <directive type="section" module="core">VirtualHost</directive>.</p>
+
+    <p>The above configuration is what you will want to use in almost
+    all name-based virtual hosting situations. The only thing that this
+    configuration will not work for, in fact, is when you are serving
+    different content based on differing IP addresses or ports.</p>
 
     <note>
             <title>Note</title>
 
-           <p>You can, if you wish, replace <code>*</code> with the actual
-           IP address of the system, when you don't care to discriminate based
-           on the IP address or port.</p>
+           <p>You may replace <code>*</code> with a specific IP address
+           on the system.  Such virtual hosts will only be used for
+           HTTP requests received on connection to the specified IP
+           address.</p>
 
            <p>However, it is additionally useful to use <code>*</code>
            on systems where the IP address is not predictable - for
@@ -95,12 +100,6 @@ Listen 80
            would work without changes whenever your IP address
            changes.</p>
     </note>
-
-    <p>The above configuration is what you will want to use in almost
-    all name-based virtual hosting situations. The only thing that this
-    configuration will not work for, in fact, is when you are serving
-    different content based on differing IP addresses or ports.</p>
-
   </section>
 
   <section id="twoips"><title>Name-based hosts on more than one
@@ -126,14 +125,14 @@ DocumentRoot "/www/mainserver"
 &lt;VirtualHost 172.20.30.50&gt;
     DocumentRoot "/www/example1"
     ServerName www.example.com
-    
+
     # Other directives here ...
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.50&gt;
     DocumentRoot "/www/example2"
     ServerName www.example.org
-    
+
     # Other directives here ...
 &lt;/VirtualHost&gt;
     </highlight>
@@ -158,8 +157,8 @@ DocumentRoot "/www/mainserver"
     (<code>192.168.1.1</code>).</p>
 
     <p>The server can be made to respond to internal and external requests
-    with the same content, with just one <code>VirtualHost</code>
-    section.</p>
+    with the same content, with just one <directive type="section" module="core"
+    >VirtualHost</directive> section.</p>
 
     <highlight language="config">
 &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;
@@ -170,7 +169,7 @@ DocumentRoot "/www/mainserver"
     </highlight>
 
     <p>Now requests from both networks will be served from the same
-    <code>VirtualHost</code>.</p>
+    <directive type="section" module="core">VirtualHost</directive>.</p>
 
     <note>
           <title>Note:</title><p>On the internal
@@ -338,7 +337,7 @@ Listen 80
     <highlight language="config">
 &lt;VirtualHost *:*&gt;
     ProxyPreserveHost On
-    ProxyPass "/" "http://192.168.111.2/"
+    ProxyPass        "/" "http://192.168.111.2/"
     ProxyPassReverse "/" "http://192.168.111.2/"
     ServerName hostname.example.com
 &lt;/VirtualHost&gt;
@@ -408,7 +407,7 @@ Listen 80
 
     <highlight language="config">
 &lt;VirtualHost _default_:80&gt;
-DocumentRoot "/www/default"
+    DocumentRoot "/www/default"
 ...
 &lt;/VirtualHost&gt;
     </highlight>
@@ -486,7 +485,7 @@ DocumentRoot "/www/example1"
 &lt;/VirtualHost&gt;
 
 &lt;VirtualHost 172.20.30.40&gt;
-DocumentRoot "/www/subdomain/sub1"
+    DocumentRoot "/www/subdomain/sub1"
     ServerName www.sub1.domain.tld
     ServerPath "/sub1/"
     RewriteEngine On