From: Rich Bowen Date: Sun, 26 Dec 2004 21:47:44 +0000 (+0000) Subject: As per bug #30308, added example where a virtual host is proxied to X-Git-Tag: 2.0.53~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5af1df6eb05825b401fc61ae64a0a7b3d7994017;p=thirdparty%2Fapache%2Fhttpd.git As per bug #30308, added example where a virtual host is proxied to another server. Thanks go to Matt Burke for submitting the example. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@123367 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/vhosts/examples.html.en b/docs/manual/vhosts/examples.html.en index 01e19dea607..06420544bde 100644 --- a/docs/manual/vhosts/examples.html.en +++ b/docs/manual/vhosts/examples.html.en @@ -25,9 +25,8 @@

This document attempts to answer the commonly-asked questions about setting up virtual hosts. These scenarios are those involving multiple - web sites running on a single server, via name-based or IP-based virtual hosts. A document should be - coming soon about running sites on several servers behind a single - proxy server.

+ web sites running on a single server, via name-based or IP-based virtual hosts. +

top
+

Using Virtual_host and + mod_proxy together

+ +

The following example allows a front-end machine to proxy a + virtual host through to a server running on another machine. In the + example, a virtual host of the same name is configured on a machine + at 192.168.111.2. The ProxyPreserveHost On directive is + used so that the desired hostname is passed through, in case we are + proxying multiple hostnames to a single machine.

+ +

+ <VirtualHost *:*>
+ ProxyPreserveHost On
+ ProxyPass / http://192.168.111.2
+ ProxyPassReverse / http://192.168.111.2/
+ ServerName hostname.example.com
+ </VirtualHost> +

+ +
top
+

Using _default_ vhosts

diff --git a/docs/manual/vhosts/examples.xml b/docs/manual/vhosts/examples.xml index f88d5c7276d..3f7019d42d1 100644 --- a/docs/manual/vhosts/examples.xml +++ b/docs/manual/vhosts/examples.xml @@ -29,9 +29,8 @@ setting up virtual hosts. These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts. A document should be - coming soon about running sites on several servers behind a single - proxy server.

+ href="ip-based.html">IP-based virtual hosts. +

@@ -405,6 +404,28 @@ +
Using <code>Virtual_host</code> and + mod_proxy together + +

The following example allows a front-end machine to proxy a + virtual host through to a server running on another machine. In the + example, a virtual host of the same name is configured on a machine + at 192.168.111.2. The ProxyPreserveHost On directive is + used so that the desired hostname is passed through, in case we are + proxying multiple hostnames to a single machine.

+ + + <VirtualHost *:*>
+ ProxyPreserveHost On
+ ProxyPass / http://192.168.111.2
+ ProxyPassReverse / http://192.168.111.2/
+ ServerName hostname.example.com
+ </VirtualHost> +
+ +
+
Using <code>_default_</code> vhosts