From 335e749ec99b30bd65eed2587d6759abd413d4b9 Mon Sep 17 00:00:00 2001 From: Joshua Slive Date: Sat, 27 Oct 2001 22:22:00 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91676 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/vhosts/name-based.html | 35 +++++++++++++++------------ docs/manual/vhosts/name-based.html.en | 35 +++++++++++++++------------ 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/docs/manual/vhosts/name-based.html b/docs/manual/vhosts/name-based.html index b6bde6cef0..075140a6bf 100644 --- a/docs/manual/vhosts/name-based.html +++ b/docs/manual/vhosts/name-based.html @@ -72,12 +72,12 @@ they are on separate IP addresses. Related Directives

-DocumentRoot
-NameVirtualHost
-ServerAlias
-ServerName
-ServerPath
-VirtualHost
+DocumentRoot
+NameVirtualHost
+ServerAlias
+ServerName
+ServerPath
+VirtualHost

To use name-based virtual hosting, you must designate the IP @@ -89,7 +89,9 @@ be used, you can use * as the argument to NameVirtualHost. Note that mentioning an IP address in a NameVirtualHost directive does not automatically make the server listen to that IP address. See Setting -which addresses and ports Apache uses for more details. +which addresses and ports Apache uses for more details. In addition, +any IP address specified here must be associated with a network interface +on the server.

The next step is to create a <VirtualHost> block for @@ -104,26 +106,27 @@ href="../mod/core.html#documentroot">DocumentRoot directive to show where in the filesystem the content for that host lives.

For example, suppose that both www.domain.tld and -www.otherdomain.tld point at the IP address -111.22.33.44. Then you simply add the following +www.otherdomain.tld point at an IP address +that the server is listening to. Then you simply add the following to httpd.conf:

-    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>
 
-

In the simplest case, the IP address 111.22.44.33 can be -replaced by * to match all IP addresses for your server.

+

You can alternatively specify an explicit IP address in place of +the * in both the NameVirtualHost and +<VirtualHost> directives.

Many servers want to be accessible by more than one name. This is possible with the www.domain.tld virtual host. The wildcard characters * and ? can be used to match names. Of course, you can't just make up names and place them in ServerName or ServerAlias. You must first have your DNS server -properly configured to map those names to the IP address in the -NameVirtualHost directive.

+properly configured to map those names to an IP address associated +with your server.

Finally, you can fine-tune the configuration of the virtual hosts by placing other directives inside the diff --git a/docs/manual/vhosts/name-based.html.en b/docs/manual/vhosts/name-based.html.en index b6bde6cef0..075140a6bf 100644 --- a/docs/manual/vhosts/name-based.html.en +++ b/docs/manual/vhosts/name-based.html.en @@ -72,12 +72,12 @@ they are on separate IP addresses. Related Directives

-
DocumentRoot
-NameVirtualHost
-ServerAlias
-ServerName
-ServerPath
-VirtualHost
+DocumentRoot
+NameVirtualHost
+ServerAlias
+ServerName
+ServerPath
+VirtualHost

To use name-based virtual hosting, you must designate the IP @@ -89,7 +89,9 @@ be used, you can use * as the argument to NameVirtualHost. Note that mentioning an IP address in a NameVirtualHost directive does not automatically make the server listen to that IP address. See Setting -which addresses and ports Apache uses for more details. +which addresses and ports Apache uses for more details. In addition, +any IP address specified here must be associated with a network interface +on the server.

The next step is to create a <VirtualHost> block for @@ -104,26 +106,27 @@ href="../mod/core.html#documentroot">DocumentRoot directive to show where in the filesystem the content for that host lives.

For example, suppose that both www.domain.tld and -www.otherdomain.tld point at the IP address -111.22.33.44. Then you simply add the following +www.otherdomain.tld point at an IP address +that the server is listening to. Then you simply add the following to httpd.conf:

-    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>
 
-

In the simplest case, the IP address 111.22.44.33 can be -replaced by * to match all IP addresses for your server.

+

You can alternatively specify an explicit IP address in place of +the * in both the NameVirtualHost and +<VirtualHost> directives.

Many servers want to be accessible by more than one name. This is possible with the www.domain.tld virtual host. The wildcard characters * and ? can be used to match names. Of course, you can't just make up names and place them in ServerName or ServerAlias. You must first have your DNS server -properly configured to map those names to the IP address in the -NameVirtualHost directive.

+properly configured to map those names to an IP address associated +with your server.

Finally, you can fine-tune the configuration of the virtual hosts by placing other directives inside the -- 2.50.1