diff options
author | Rich Bowen <rbowen@apache.org> | 2002-06-26 02:31:47 +0000 |
---|---|---|
committer | Rich Bowen <rbowen@apache.org> | 2002-06-26 02:31:47 +0000 |
commit | 3e3d43d8854b7f9a2f64b3cba8ad9f1c0d116fa7 (patch) | |
tree | f72d17a54d51b3b90e72544e1003db8689dbb5d0 /docs/manual/vhosts/examples.html | |
parent | 4c67f757e66c14b278cc4d8b38bdf707063fc503 (diff) | |
download | httpd-3e3d43d8854b7f9a2f64b3cba8ad9f1c0d116fa7.tar.gz |
Obtained from: IRC, various other conversations
A number of people commented that they thought that beginners would find
that the IP addresses used in examples did not appear "real" enough.
Also, that the ".tld" domain names used in examples were confusing.
Examples have been changed to use 172.20 IP addresses, and host names
using more recognized tlds.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95886 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/vhosts/examples.html')
-rw-r--r-- | docs/manual/vhosts/examples.html | 139 |
1 files changed, 73 insertions, 66 deletions
diff --git a/docs/manual/vhosts/examples.html b/docs/manual/vhosts/examples.html index 94c3f32f24..c08a8f288f 100644 --- a/docs/manual/vhosts/examples.html +++ b/docs/manual/vhosts/examples.html @@ -159,8 +159,9 @@ wrong site</li> <tr> <td bgcolor="#eeeeee"> <pre> - NameVirtualHost 12.34.56.78 - <VirtualHost 12.34.56.78> + NameVirtualHost 172.20.30.40 + + <VirtualHost 172.20.30.40> # etc ... </pre> </td> @@ -201,9 +202,9 @@ wrong site</li> </blockquote> <strong>Setup 1:</strong> - <p>The server has two IP addresses. On one (<samp>1.2.3.4</samp>), we - will serve the "main" server, and on the other (<samp>5.6.7.8</samp>), - we will serve two or more virtual hosts.</p> + <p>The server has two IP addresses. On one (<samp>172.20.30.40</samp>), we + will serve the "main" server, <samp>server.domain.com</samp> and on the + other (<samp>172.20.30.50</samp>), we will serve two or more virtual hosts.</p> <p><strong>Server configuration:</strong></p> @@ -214,14 +215,14 @@ wrong site</li> <pre> Listen 80 - # This is the "main" server + # This is the "main" server running on 172.20.30.40 ServerName server.domain.com DocumentRoot /www/mainserver # This is the other address - NameVirtualHost 5.6.7.8 + NameVirtualHost 172.20.30.50 - <VirtualHost 5.6.7.8> + <VirtualHost 172.20.30.50> DocumentRoot /www/example1 ServerName www.example1.com @@ -229,7 +230,7 @@ wrong site</li> </VirtualHost> - <VirtualHost 5.6.7.8> + <VirtualHost 172.20.30.50> DocumentRoot /www/example2 ServerName www.example2.org @@ -242,8 +243,8 @@ wrong site</li> </table> </blockquote> - <p>Any request to an address other than <samp>5.6.7.8</samp> will be - served from the main server. A request to <samp>5.6.7.8</samp> with an + <p>Any request to an address other than <samp>172.20.30.50</samp> will be + served from the main server. A request to <samp>172.20.30.50</samp> with an unknown hostname, or no <code>Host:</code> header, will be served from <samp>www.example1.com</samp>.</p> @@ -254,10 +255,10 @@ wrong site</li> <strong>Setup:</strong> <p>The server machine has two IP addresses (<samp>192.168.1.1</samp> - and <samp>11.22.33.44</samp>). The machine is sitting between an + and <samp>172.20.30.40</samp>). The machine is sitting between an internal (intranet) network and an external (internet) network. Outside of the network, the name <samp>server.example.com</samp> resolves to - the external address (<samp>111.22.33.55</samp>), but inside the + the external address (<samp>172.20.30.40</samp>), but inside the network, that same name resolves to the internal address (<samp>192.168.1.1</samp>).</p> @@ -273,9 +274,9 @@ wrong site</li> <td bgcolor="#eeeeee"> <pre> NameVirtualHost 192.168.1.1 - NameVirtualHost 11.22.33.44 + NameVirtualHost 172.20.30.40 - <VirtualHost 192.168.1.1 11.22.33.44> + <VirtualHost 192.168.1.1 172.20.30.40> DocumentRoot /www/server1 ServerName server.example.com ServerAlias server @@ -292,12 +293,18 @@ wrong site</li> <blockquote> <table> <tr> - <td bgcolor="#e0e5f5"><strong>Note:</strong> On the internal + <td bgcolor="#e0e5f5"> + + <p><strong>Note:</strong> On the internal network, one can just use the name <code>server</code> rather - than the fully qualified host name <code>server.example.com. Note - also that, in the above example, you can replace the list of IP - addresses with</code> *, which will cause the server to respond - the same on all addresses.</td> + than the fully qualified host name + <code>server.example.com</code>.</p> + + <p>Note also that, in the above example, you can replace the list + of IP addresses with <code>*</code>, which will cause the server to + respond the same on all addresses.</p> + + </td> </tr> </table> </blockquote> @@ -324,26 +331,26 @@ wrong site</li> Listen 80 Listen 8080 - NameVirtualHost 11.22.33.44:80 - NameVirtualHost 11.22.33.44:8080 + NameVirtualHost 172.20.30.40:80 + NameVirtualHost 172.20.30.40:8080 - <VirtualHost 11.22.33.44:80> - ServerName www.domain.tld + <VirtualHost 172.20.30.40:80> + ServerName www.example1.com DocumentRoot /www/domain-80 </VirtualHost> - <VirtualHost 11.22.33.44:8080> - ServerName www.domain.tld + <VirtualHost 172.20.30.40:8080> + ServerName www.example1.com DocumentRoot /www/domain-8080 </VirtualHost> - <VirtualHost 11.22.33.44:80> - ServerName www.otherdomain.tld + <VirtualHost 172.20.30.40:80> + ServerName www.example2.org DocumentRoot /www/otherdomain-80 </VirtualHost> - <VirtualHost 11.22.33.44:8080> - ServerName www.otherdomain.tld + <VirtualHost 172.20.30.40:8080> + ServerName www.example2.org DocumentRoot /www/otherdomain-8080 </VirtualHost> </pre> @@ -357,8 +364,8 @@ wrong site</li> <p><strong>Setup:</strong></p> - <p>The server has two IP addresses (<samp>1.2.3.4</samp> and - <samp>5.6.7.8</samp>) which resolve to the names + <p>The server has two IP addresses (<samp>172.20.30.40</samp> and + <samp>172.20.30.50</samp>) which resolve to the names <samp>www.example1.com</samp> and <samp>www.example2.org</samp> respectively.</p> @@ -371,12 +378,12 @@ wrong site</li> <pre> Listen 80 - <VirtualHost 1.2.3.4> + <VirtualHost 172.20.30.40> DocumentRoot /www/example1 ServerName www.example1.com </VirtualHost> - <VirtualHost 5.6.7.8> + <VirtualHost 172.20.30.50> DocumentRoot /www/example2 ServerName www.example2.org </VirtualHost> @@ -397,8 +404,8 @@ wrong site</li> <p><strong>Setup:</strong></p> - <p>The server machine has two IP addresses (<samp>1.2.3.4</samp> and - <samp>5.6.7.8</samp>) which resolve to the names + <p>The server machine has two IP addresses (<samp>172.20.30.40</samp> and + <samp>172.20.30.50</samp>) which resolve to the names <samp>www.example1.com</samp> and <samp>www.example2.org</samp> respectively. In each case, we want to run hosts on ports 80 and 8080.</p> @@ -408,27 +415,27 @@ wrong site</li> <tr> <td bgcolor="#eeeeee"> <pre> - Listen 1.2.3.4:80 - Listen 1.2.3.4:8080 - Listen 5.6.7.8:80 - Listen 5.6.7.8:8080 + Listen 172.20.30.40:80 + Listen 172.20.30.40:8080 + Listen 172.20.30.50:80 + Listen 172.20.30.50:8080 - <VirtualHost 1.2.3.4:80> + <VirtualHost 172.20.30.40:80> DocumentRoot /www/example1-80 ServerName www.example1.com </VirtualHost> - <VirtualHost 1.2.3.4:8080> + <VirtualHost 172.20.30.40:8080> DocumentRoot /www/example1-8080 ServerName www.example1.com </VirtualHost> - <VirtualHost 5.6.7.8:80> + <VirtualHost 172.20.30.50:80> DocumentRoot /www/example2-80 ServerName www.example1.org </VirtualHost> - <VirtualHost 5.6.7.8:8080> + <VirtualHost 172.20.30.50:8080> DocumentRoot /www/example2-8080 ServerName www.example2.org </VirtualHost> @@ -456,30 +463,30 @@ wrong site</li> <pre> Listen 80 - NameVirtualHost 1.2.3.4 + NameVirtualHost 172.20.30.40 - <VirtualHost 1.2.3.4> + <VirtualHost 172.20.30.40> DocumentRoot /www/example1 ServerName www.example1.com </VirtualHost> - <VirtualHost 1.2.3.4> + <VirtualHost 172.20.30.40> DocumentRoot /www/example2 ServerName www.example2.org </VirtualHost> - <VirtualHost 1.2.3.4> + <VirtualHost 172.20.30.40> DocumentRoot /www/example3 ServerName www.example3.net </VirtualHost> # IP-based - <VirtualHost 5.6.7.8> + <VirtualHost 172.20.30.50> DocumentRoot /www/example4 ServerName www.example4.edu </VirtualHost> - <VirtualHost 9.8.7.6> + <VirtualHost 172.20.30.60> DocumentRoot /www/example5 ServerName www.example5.gov </VirtualHost> @@ -595,13 +602,13 @@ wrong site</li> <p><strong>Setup:</strong></p> <p>The name-based vhost with the hostname - <samp>www.otherdomain.tld</samp> (from our <a + <samp>www.example2.org</samp> (from our <a href="#name">name-based</a> example, setup 2) should get its own IP address. To avoid problems with name servers or proxies who cached the old IP address for the name-based vhost we want to provide both variants during a migration phase.<br /> The solution is easy, because we can simply add the new IP address - (<samp>111.22.33.66</samp>) to the <code>VirtualHost</code> + (<samp>172.20.30.50</samp>) to the <code>VirtualHost</code> directive.</p> <p><strong>Server configuration:</strong></p> @@ -612,21 +619,21 @@ wrong site</li> <td bgcolor="#eeeeee"> <pre> Listen 80 - ServerName www.domain.tld - DocumentRoot /www/domain + ServerName www.example1.com + DocumentRoot /www/example1 - NameVirtualHost 111.22.33.55 + NameVirtualHost 172.20.30.40 - <VirtualHost 111.22.33.55 111.22.33.66> - DocumentRoot /www/otherdomain - ServerName www.otherdomain.tld + <VirtualHost 172.20.30.40 172.20.30.50> + DocumentRoot /www/example2 + ServerName www.example2.org # ... </VirtualHost> - <VirtualHost 111.22.33.55> - DocumentRoot /www/subdomain - ServerName www.sub.domain.tld - ServerAlias *.sub.domain.tld + <VirtualHost 172.20.30.40> + DocumentRoot /www/example3 + ServerName www.example3.net + ServerAlias *.example3.net # ... </VirtualHost> </pre> @@ -661,9 +668,9 @@ wrong site</li> <tr> <td bgcolor="#eeeeee"> <pre> - NameVirtualHost 111.22.33.44 + NameVirtualHost 172.20.30.40 - <VirtualHost 111.22.33.44> + <VirtualHost 172.20.30.40> # primary vhost DocumentRoot /www/subdomain RewriteEngine On @@ -671,7 +678,7 @@ wrong site</li> # ... </VirtualHost> - <VirtualHost 111.22.33.44> + <VirtualHost 172.20.30.40> DocumentRoot /www/subdomain/sub1 ServerName www.sub1.domain.tld ServerPath /sub1/ @@ -680,7 +687,7 @@ wrong site</li> # ... </VirtualHost> - <VirtualHost 111.22.33.44> + <VirtualHost 172.20.30.40> DocumentRoot /www/subdomain/sub2 ServerName www.sub2.domain.tld ServerPath /sub2/ |