From: Rich Bowen Date: Sat, 22 Jun 2002 19:49:34 +0000 (+0000) Subject: Largely rewritten, based on feedback on the list, on IRC, and questions X-Git-Tag: 2.0.40~411 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04b22cbd50016785f738f97c46e6b32e7f7ea20d;p=apache Largely rewritten, based on feedback on the list, on IRC, and questions on usenet. Hopefully this is a little more what people are actually looking for, and will steer people towards better practices. Quite a lot of work still needs to be done, but this is the first cut, and, I think, somewhat of an improvement. Comments solicited. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95849 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/vhosts/examples.html b/docs/manual/vhosts/examples.html index a1c3e3fe94..94c3f32f24 100644 --- a/docs/manual/vhosts/examples.html +++ b/docs/manual/vhosts/examples.html @@ -1,535 +1,616 @@ - - -VirtualHost Examples - - - - - -

Virtual Host examples for common setups

- - -

Base configuration

- - - -

Additional features

- - - -
- -

Simple name-based vhosting

- - +

Setup:

-
+

The server has two IP addresses (1.2.3.4 and + 5.6.7.8) which resolve to the names + www.example1.com and www.example2.org + respectively.

-

IP-based vhosts

+

Server configuration:

- +

Using _default_ + vhosts

-
+

Setup 1:

-

Port-based vhosts

+

Catching every request to any unspecified IP address and + port, i.e., an address/port combination that is not used for + any other virtual host.

- - -
+

A default vhost never serves a request that was sent to an + address/port that is used for name-based vhosts. If the request + contained an unknown or no Host: header it is always + served from the primary name-based vhost (the vhost for that + address/port appearing first in the configuration file).

-

Using _default_ vhosts

+

You can use AliasMatch or + RewriteRule + to rewrite any request to a single information page (or script).

- +

The default vhost for port 80 (which must appear before any + default vhost with a wildcard port) catches all requests that were sent + to an unspecified IP address. The main server is never used to serve a + request.

-
+

Setup 3:

-

Migrating a name-based vhost to an IP-based vhost

+

We want to have a default vhost for port 80, but no other default + vhosts.

-