the IP address of any of the webservers will be served from the "main" or
"default" server configurations. The "main" server configuration consists
of all those definitions appearing outside of any VirtualHost section.
-You may want instead to define a <code><VirtualHost _default></code>
-which returns 403 or 404 for all hits.
+You may want instead to define a <code><VirtualHost _default_:*></code>
+which returns 403 or 404 for all hits. (The trailing <code>:*</code>
+makes it apply to all ports, which is just a safety measure should you
+begin using multiple <code><a href="mod/core.html#listen">Listen</a></code>
+directives.)
<h3><a name="tips">Tips to Avoid these problems</a></h3>
<li> use IP addresses in <code>Listen</code>
<li> use IP addresses in <code>BindAddress</code>
<li> ensure all virtual hosts have an explicit <code>ServerName</code>
-<li> create a <code><VirtualHost _default_></code> server that
+<li> create a <code><VirtualHost _default_:*></code> server that
has no pages to serve
</ul>
</menu> Example:
<blockquote>
<code>
-<VirtualHost host.foo.com> <br>
+<VirtualHost 10.1.2.3> <br>
ServerAdmin webmaster@host.foo.com <br>
DocumentRoot /www/docs/host.foo.com <br>
ServerName host.foo.com <br>
the "main" server config, consisting of all those definitions outside
any VirtualHost section, is used when no match occurs.<p>
+You can specify a <code>:port</code> to change the port that is matched.
+If unspecified then it defaults to the same port as the most recent
+<code><a href="#port">Port</a></code> statement of the main server. You
+may also specify <code>:*</code> to match all ports on that address.
+(This is recommended when used with <code>_default_</code>.)<p>
+
<strong>SECURITY</strong>: See the
<A HREF="../misc/security_tips.html">security tips</A>
document for details on why your security could be compromised if