slive 01/10/27 15:21:09
Modified: htdocs/manual/vhosts name-based.html.en
Log:
Fix some broken links, change to the simplest possible example, and add a
couple notes to give hints to people running servers behind port-forwarding
firewalls.
Revision Changes Path
1.18 +19 -16 httpd-docs-1.3/htdocs/manual/vhosts/name-based.html.en
Index: name-based.html.en
===================================================================
RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/vhosts/name-based.html.en,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -b -u -r1.17 -r1.18
--- name-based.html.en 2001/10/22 20:15:26 1.17
+++ name-based.html.en 2001/10/27 22:21:09 1.18
@@ -72,12 +72,12 @@
<tr><td align="top">
<strong>Related Directives</strong><br><br>
-<a href="mod/core.html#documentroot">DocumentRoot</a><br />
-<a href="mod/core.html#namevirtualhost">NameVirtualHost</a><br />
-<a href="mod/core.html#serveralias">ServerAlias</a><br />
-<a href="mod/core.html#servername">ServerName</a><br />
-<a href="mod/core.html#serverpath">ServerPath</a><br />
-<a href="mod/core.html#virtualhost">VirtualHost</a><br />
+<a href="../mod/core.html#documentroot">DocumentRoot</a><br />
+<a href="../mod/core.html#namevirtualhost">NameVirtualHost</a><br />
+<a href="../mod/core.html#serveralias">ServerAlias</a><br />
+<a href="../mod/core.html#servername">ServerName</a><br />
+<a href="../mod/core.html#serverpath">ServerPath</a><br />
+<a href="../mod/core.html#virtualhost">VirtualHost</a><br />
</td></tr></table>
<p>To use name-based virtual hosting, you must designate the IP
@@ -89,7 +89,9 @@
<code>NameVirtualHost</code>. Note that mentioning an IP address in a
<code>NameVirtualHost</code> directive does not automatically make the
server listen to that IP address. See <a href="../bind.html">Setting
-which addresses and ports Apache uses</a> for more details.
+which addresses and ports Apache uses</a> for more details. In addition,
+any IP address specified here must be associated with a network interface
+on the server.</p>
<p>The next step is to create a <a
href="../mod/core.html#virtualhost"><VirtualHost></a> block for
@@ -104,26 +106,27 @@
show where in the filesystem the content for that host lives.</p>
<p>For example, suppose that both <samp>www.domain.tld</samp> and
-<samp>www.otherdomain.tld</samp> point at the IP address
-<samp>111.22.33.44</samp>. Then you simply add the following
+<samp>www.otherdomain.tld</samp> point at an IP address
+that the server is listening to. Then you simply add the following
to <code>httpd.conf</code>:</p>
<pre>
- NameVirtualHost 111.22.33.44
+ NameVirtualHost *
- <VirtualHost 111.22.33.44>
+ <VirtualHost *>
ServerName www.domain.tld
DocumentRoot /www/domain
</VirtualHost>
- <VirtualHost 111.22.33.44>
+ <VirtualHost *>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>
</pre>
-<p>In the simplest case, the IP address <code>111.22.44.33</code> can be
-replaced by <code>*</code> to match all IP addresses for your server.</p>
+<p>You can alternatively specify an explicit IP address in place of
+the * in both the <code>NameVirtualHost</code> and
+<code><VirtualHost></code> directives.</p>
<p>Many servers want to be accessible by more than one name. This is
possible with the <a
@@ -141,8 +144,8 @@
wildcard characters * and ? can be used to match names. Of course,
you can't just make up names and place them in <code>ServerName</code>
or <code>ServerAlias</code>. You must first have your DNS server
-properly configured to map those names to the IP address in the
-<code>NameVirtualHost</code> directive.</p>
+properly configured to map those names to an IP address associated
+with your server.</p>
<p>Finally, you can fine-tune the configuration of the virtual hosts
by placing other directives inside the
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]