]> granicus.if.org Git - apache/commitdiff
Add documentation about :port in virtualhost. Note the necessity of
authordgaudet <dgaudet@unknown>
Sun, 4 May 1997 20:11:53 +0000 (20:11 +0000)
committerdgaudet <dgaudet@unknown>
Sun, 4 May 1997 20:11:53 +0000 (20:11 +0000)
using _default_:* if the user wants to match all ips on all ports.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@78098 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/dns-caveats.html
docs/manual/mod/core.html

index f91b566f53b9adf1517790a0e82c4596daa2db6f..bf2d035159a654c2c006613c1355de685ec4afe1 100644 (file)
@@ -139,8 +139,11 @@ for your OS.
 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>&lt;VirtualHost _default&gt;</code>
-which returns 403 or 404 for all hits.
+You may want instead to define a <code>&lt;VirtualHost _default_:*&gt;</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>
 
@@ -149,7 +152,7 @@ which returns 403 or 404 for all hits.
 <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>&lt;VirtualHost _default_&gt;</code> server that
+<li> create a <code>&lt;VirtualHost _default_:*&gt;</code> server that
     has no pages to serve
 </ul>
 
index be856452042cac0b4bb36e9f901314c93adf1277..3b27c5bb67acb95818ab0d7f7fe29ff5ab886dd2 100644 (file)
@@ -1370,7 +1370,7 @@ section. <em>Addr</em> can be
 </menu> Example:
 <blockquote>
 <code>
-&lt;VirtualHost host.foo.com&gt; <br>
+&lt;VirtualHost 10.1.2.3&gt; <br>
 ServerAdmin webmaster@host.foo.com <br>
 DocumentRoot /www/docs/host.foo.com <br>
 ServerName host.foo.com <br>
@@ -1393,6 +1393,12 @@ in another virtual host.  In the absence of any _default_ virtual host
 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