required directive if you want to configure <a href="../vhosts/">name-based virtual hosts</a>.</p>
<p>Although <var>addr</var> can be hostname it is recommended
- that you always use an IP address, e.g.</p>
+ that you always use an IP address and a port, e.g.</p>
<div class="example"><p><code>
- NameVirtualHost 111.22.33.44
+ NameVirtualHost 111.22.33.44:80
</code></p></div>
<p>With the <code class="directive">NameVirtualHost</code> directive you
exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p>
<div class="example"><p><code>
- NameVirtualHost 1.2.3.4<br />
- <VirtualHost 1.2.3.4><br />
+ NameVirtualHost 1.2.3.4:80<br />
+ <VirtualHost 1.2.3.4:80><br />
# ...<br />
</VirtualHost><br />
</code></p></div>
</ul>
<div class="example"><h3>Example</h3><p><code>
- <VirtualHost 10.1.2.3><br />
+ <VirtualHost 10.1.2.3:80><br />
<span class="indent">
ServerAdmin webmaster@host.example.com<br />
DocumentRoot /www/docs/host.example.com<br />
IPv6 example is shown below:</p>
<div class="example"><p><code>
- <VirtualHost [2001:db8::a00:20ff:fea7:ccea]><br />
+ <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80><br />
<span class="indent">
ServerAdmin webmaster@host.example.com<br />
DocumentRoot /www/docs/host.example.com<br />
href="../vhosts/">name-based virtual hosts</a>.</p>
<p>Although <var>addr</var> can be hostname it is recommended
- that you always use an IP address, e.g.</p>
+ that you always use an IP address and a port, e.g.</p>
<example>
- NameVirtualHost 111.22.33.44
+ NameVirtualHost 111.22.33.44:80
</example>
<p>With the <directive>NameVirtualHost</directive> directive you
>NameVirtualHost</directive> directive.</p>
<example>
- NameVirtualHost 1.2.3.4<br />
- <VirtualHost 1.2.3.4><br />
+ NameVirtualHost 1.2.3.4:80<br />
+ <VirtualHost 1.2.3.4:80><br />
# ...<br />
</VirtualHost><br />
</example>
</ul>
<example><title>Example</title>
- <VirtualHost 10.1.2.3><br />
+ <VirtualHost 10.1.2.3:80><br />
<indent>
ServerAdmin webmaster@host.example.com<br />
DocumentRoot /www/docs/host.example.com<br />
IPv6 example is shown below:</p>
<example>
- <VirtualHost [2001:db8::a00:20ff:fea7:ccea]><br />
+ <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80><br />
<indent>
ServerAdmin webmaster@host.example.com<br />
DocumentRoot /www/docs/host.example.com<br />