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>
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>
TransferLog logs/host.foo.com-access_log<br />
</VirtualHost></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><VirtualHost [fe80::a00:20ff:fea7:ccea]><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 />
+ </VirtualHost></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
<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
<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
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 />