]> granicus.if.org Git - apache/commitdiff
Describe IPv6 syntax for Listen, Allow from, and <VirtualHost >.
authorJeff Trawick <trawick@apache.org>
Tue, 19 Feb 2002 14:29:51 +0000 (14:29 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 19 Feb 2002 14:29:51 +0000 (14:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93491 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/bind.html
docs/manual/bind.html.en
docs/manual/mod/core.html
docs/manual/mod/mod_access.html
docs/manual/mod/mod_access.xml
docs/manual/mod/mpm_common.html

index d587810315d91433007f1bc87083e2d180b942e0..a52d8ee3d0a991e6e4ae8e19874bc681073036ac 100644 (file)
    Listen 192.170.2.1:80
    Listen 192.170.2.5:8000
 </pre>
+    IPv6 addresses must be surrounded in square brackets, as in the
+    following example:
+<pre>
+   Listen [fe80::a00:20ff:fea7:ccea]:80
+</pre>
+
+    <h2>Special IPv6 considerations</h2>
+
+    When APR supports IPv6, Apache will create IPv6-capable listening
+    sockets by default (i.e., when no IP address is specified on the
+    Listen directive).  In other words, when APR supports IPv6,
+<pre>
+   Listen 80
+</pre>
+    is equivalent to 
+<pre>
+   Listen [::]:80
+</pre>
+    When APR does not support IPv6,
+<pre>
+   Listen 80
+</pre>
+    is equivalent to
+<pre>
+   Listen 0.0.0.0:80
+</pre>
+    On some platforms, such as NetBSD, binding to the IPv6 wildcard address 
+    ("::") does not allow Apache to accept connections on IPv4 interfaces.
+    In this situation, multiple Listen directives are required, as shown
+    below:
+<pre>
+   Listen 0.0.0.0:80
+   Listen [::]:80
+</pre>
+    Apache does not currently detect this, so the Listen statements must
+    be edited manually by the administrator.
 
     <h2>How this works with Virtual Hosts</h2>
 
index d587810315d91433007f1bc87083e2d180b942e0..a52d8ee3d0a991e6e4ae8e19874bc681073036ac 100644 (file)
    Listen 192.170.2.1:80
    Listen 192.170.2.5:8000
 </pre>
+    IPv6 addresses must be surrounded in square brackets, as in the
+    following example:
+<pre>
+   Listen [fe80::a00:20ff:fea7:ccea]:80
+</pre>
+
+    <h2>Special IPv6 considerations</h2>
+
+    When APR supports IPv6, Apache will create IPv6-capable listening
+    sockets by default (i.e., when no IP address is specified on the
+    Listen directive).  In other words, when APR supports IPv6,
+<pre>
+   Listen 80
+</pre>
+    is equivalent to 
+<pre>
+   Listen [::]:80
+</pre>
+    When APR does not support IPv6,
+<pre>
+   Listen 80
+</pre>
+    is equivalent to
+<pre>
+   Listen 0.0.0.0:80
+</pre>
+    On some platforms, such as NetBSD, binding to the IPv6 wildcard address 
+    ("::") does not allow Apache to accept connections on IPv4 interfaces.
+    In this situation, multiple Listen directives are required, as shown
+    below:
+<pre>
+   Listen 0.0.0.0:80
+   Listen [::]:80
+</pre>
+    Apache does not currently detect this, so the Listen statements must
+    be edited manually by the administrator.
 
     <h2>How this works with Virtual Hosts</h2>
 
index cb6e672f4655de5e617a398aed25baa2f6156aeb..215e30b11fbabdc5a1f714d4a56bd7c46a7ab551 100644 (file)
        TransferLog logs/host.foo.com-access_log<br />
        &lt;/VirtualHost&gt;</code>
     </blockquote>
-    Each VirtualHost must correspond to a different IP address,
+
+    <p>IPv6 addresses must be specified in square brackets because
+    the optional port number could not be determined otherwise.  An
+    IPv6 example is shown below:</p>
+    
+    <blockquote>
+      <code>&lt;VirtualHost [fe80::a00:20ff:fea7:ccea]&gt;<br />
+       ServerAdmin webmaster@host.foo.com<br />
+       DocumentRoot /www/docs/host.foo.com<br />
+       ServerName host.foo.com<br />
+       ErrorLog logs/host.foo.com-error_log<br />
+       TransferLog logs/host.foo.com-access_log<br />
+       &lt;/VirtualHost&gt;</code>
+    </blockquote>
+
+    <p>Each VirtualHost must correspond to a different IP address,
     different port number or a different host name for the server,
     in the former case the server machine must be configured to
     accept IP packets for multiple addresses. (If the machine does
     not have multiple network interfaces, then this can be
     accomplished with the <code>ifconfig alias</code> command (if
     your OS supports it), or with kernel patches like <a
-    href="../misc/vif-info.html">VIF</a> (for SunOS(TM) 4.1.x)). 
+    href="../misc/vif-info.html">VIF</a> (for SunOS(TM) 4.1.x)).</p>
 
     <p>The special name <code>_default_</code> can be specified in
     which case this virtual host will match any IP address that is
index 1a6e6468c7dde50da418c034c2baf7c9346055ba..915dcbee70df6647216f098643c56bce8aec2117 100644 (file)
     <p>Note that the last three examples above match exactly the
     same set of hosts.</p>
 
+    <p>IPv6 addresses and IPv6 subnets can be specified as shown
+    below:</p>
+
+    <pre>
+       Allow from fe80::a00:20ff:fea7:ccea
+       Allow from fe80::a00:20ff:fea7:ccea/10
+    </pre>
+
     <p>The third format of the arguments to the <code>Allow</code>
     directive allows access to the server to be controlled based on
     the existence of an <a href="../env.html">environment
index 4fcbbf85670c99e36b0429f2980deecf8f62cae9..1284f05d6ba338b1a9ed90955219c45ec8322598 100644 (file)
@@ -118,6 +118,14 @@ server</description>
     <p>Note that the last three examples above match exactly the
     same set of hosts.</p>
 
+    <p>IPv6 addresses and IPv6 subnets can be specified as shown
+    below:</p>
+
+    <example>
+       Allow from fe80::a00:20ff:fea7:ccea
+       Allow from fe80::a00:20ff:fea7:ccea/10
+    </example>
+
     <p>The third format of the arguments to the
     <directive>Allow</directive> directive allows access to the server
     to be controlled based on the existence of an <a
index c1cd5ed8eff5919ea0a48b086fbc36e79615a885..8bb64f2de372861465fbb0ad65a7354c7f445f51 100644 (file)
    Listen 192.170.2.1:80
    Listen 192.170.2.5:8000
 </pre>
+    IPv6 addresses must be surrounded in square brackets, as in the
+    following example:
+<pre>
+   Listen [fe80::a00:20ff:fea7:ccea]:80
+</pre>
 
     <p><strong>See Also:</strong> <a href="../dns-caveats.html">DNS
     Issues</a><br />