From 79e9c7825ba82bf10d0f926b379eeea7c0e185e5 Mon Sep 17 00:00:00 2001
From: Christophe Jaillet
The complete list of names in the
The complete list of names in the
Additionally, this is used when
creating self-referential redirection URLs when
-
For example, if the name of the
diff --git a/docs/manual/vhosts/examples.xml b/docs/manual/vhosts/examples.xml
index 44540348e6..6a87b7842e 100644
--- a/docs/manual/vhosts/examples.xml
+++ b/docs/manual/vhosts/examples.xml
@@ -38,10 +38,9 @@
Your server has a single IP address, and multiple aliases (CNAMES)
- point to this machine in DNS. You want to run a web server for
- Your server has multiple hostnames that resolve to a single address,
+ and you want to respond differently for Creating virtual
host configurations on your Apache server does not magically
@@ -59,7 +58,7 @@ Listen 80
<VirtualHost *:80>
DocumentRoot "/www/example1"
ServerName www.example.com
-
+
# Other directives here
</VirtualHost>
@@ -77,15 +76,21 @@ Listen 80
in the configuration file, it has the highest priority and can be seen
as the default or primary server. That means
that if a request is received that does not match one of the specified
- www.example.com
and www.example.org
on this
- machine.www.example.com
+ and www.example.org
.ServerName
directives, it will be served by this first
- VirtualHost
.
The above configuration is what you will want to use in almost + all name-based virtual hosting situations. The only thing that this + configuration will not work for, in fact, is when you are serving + different content based on differing IP addresses or ports.
You can, if you wish, replace *
with the actual
- IP address of the system, when you don't care to discriminate based
- on the IP address or port.
You may replace *
with a specific IP address
+ on the system. Such virtual hosts will only be used for
+ HTTP requests received on connection to the specified IP
+ address.
However, it is additionally useful to use *
on systems where the IP address is not predictable - for
@@ -95,12 +100,6 @@ Listen 80
would work without changes whenever your IP address
changes.
The above configuration is what you will want to use in almost - all name-based virtual hosting situations. The only thing that this - configuration will not work for, in fact, is when you are serving - different content based on differing IP addresses or ports.
-192.168.1.1
).
The server can be made to respond to internal and external requests
- with the same content, with just one VirtualHost
- section.
Now requests from both networks will be served from the same
- VirtualHost
.
On the internal
@@ -338,7 +337,7 @@ Listen 80