From c12907c190e7ea493161f14cd484bb802e87adf0 Mon Sep 17 00:00:00 2001
From: Joshua Slive
Date: Wed, 1 Aug 2007 14:00:42 +0000
Subject: [PATCH] Merge r561456, r561463, r561477, r561485, r561797 from trunk:
Explicitly mention how to do rewriting in a vhost.
PR: 36506
Document that PT implies L.
PR: 40046
Docuemnt the x- headers added by mod_proxy_http.
PR: 41097
Document some -D magic.
PR: 41148
A couple small fixes suggested by Vincent.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@561800 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/mod/mod_proxy.html.en | 33 +++++++++++++++++++++++++++-
docs/manual/mod/mod_proxy.xml | 34 +++++++++++++++++++++++++++++
docs/manual/mod/mod_rewrite.html.en | 24 +++++++++++++++++---
docs/manual/mod/mod_rewrite.xml | 24 +++++++++++++++++---
docs/manual/programs/httpd.html.en | 7 ++++--
docs/manual/programs/httpd.xml | 7 ++++--
6 files changed, 118 insertions(+), 11 deletions(-)
diff --git a/docs/manual/mod/mod_proxy.html.en b/docs/manual/mod/mod_proxy.html.en
index acfc096dccc..d8426ff787e 100644
--- a/docs/manual/mod/mod_proxy.html.en
+++ b/docs/manual/mod/mod_proxy.html.en
@@ -95,6 +95,7 @@
Intranet Proxy
Protocol Adjustments
Request Bodys
+
Reverse Proxy Request Headers
See also
mod_cache
@@ -285,7 +286,37 @@
proxy-sendchunked minimizes resource usage by using
chunked encoding.
-
+ 
+
+
+
+
When acting in a reverse-proxy mode (using the ProxyPass directive, for example),
+ mod_proxy_http adds several request headers in
+ order to pass information to the origin server. These headers
+ are:
+
+
+ X-Forwarded-For
+ - The IP address of the client.
+ X-Forwarded-Host
+ - The original host requested by the client in the
Host
+ HTTP request header.
+ X-Forwarded-Server
+ - The hostname of the proxy server.
+
+
+
Be careful when using these headers on the origin server, since
+ they will contain more than one (comma-separated) value if the
+ original request already contained one of these headers. For
+ example, you can use %{X-Forwarded-For}i in the log
+ format string of the origin server to log the original clients IP
+ address, but you may get more than one address if the request
+ passes through several proxies.
+
+
See also the ProxyPreserveHost and ProxyVia directives, which control
+ other request headers.
+
+

diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml
index 7e9bc968352..063b21fd725 100644
--- a/docs/manual/mod/mod_proxy.xml
+++ b/docs/manual/mod/mod_proxy.xml
@@ -262,6 +262,40 @@
+
+
+
Proxy
Container for directives applied to proxied resources
diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en
index 35f0f7fe19c..20cf415e86d 100644
--- a/docs/manual/mod/mod_rewrite.html.en
+++ b/docs/manual/mod/mod_rewrite.html.en
@@ -69,6 +69,7 @@ URLs on the fly
@@ -108,6 +109,19 @@ SCRIPT_URL=/u/rse/
SCRIPT_URI=http://en1.engelschall.com/u/rse/
+
+
+
+
+
By default, mod_rewrite configuration
+ settings from the main server context are not inherited by
+ virtual hosts. To make the main server settings apply to virtual
+ hosts, you must place the following directives in each <VirtualHost> section:
+
+
+ RewriteEngine On
+ RewriteOptions Inherit
+
@@ -634,10 +648,10 @@ RewriteRule ^/$ /homepage.std.html [L]
Use this directive to disable the module instead of
commenting out all the RewriteRule directives!
-
Note that, by default, rewrite configurations are not
- inherited. This means that you need to have a
+
Note that rewrite configurations are not
+ inherited by virtual hosts. This means that you need to have a
RewriteEngine on directive for each virtual host
- in which you wish to use it.
+ in which you wish to use rewrite rules.
@@ -1344,6 +1358,10 @@ cannot use $N in the substitution string!
URL-to-filename translators. The typical example
is the use of mod_alias and
mod_rewrite.
+
+ The PT flag implies the L flag:
+ rewriting will be stopped in order to pass the request to
+ the next phase of processing.
'qsappend|QSA'
diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml
index b687d3b78dc..017b9237a0b 100644
--- a/docs/manual/mod/mod_rewrite.xml
+++ b/docs/manual/mod/mod_rewrite.xml
@@ -95,6 +95,20 @@ SCRIPT_URI=http://en1.engelschall.com/u/rse/
+Rewriting in Virtual Hosts
+
+ By default, mod_rewrite configuration
+ settings from the main server context are not inherited by
+ virtual hosts. To make the main server settings apply to virtual
+ hosts, you must place the following directives in each VirtualHost section:
+
+
+ RewriteEngine On
+ RewriteOptions Inherit
+
+
+
Practical Solutions
For numerous examples of common, and not-so-common, uses for
@@ -126,10 +140,10 @@ SCRIPT_URI=http://en1.engelschall.com/u/rse/
commenting out all the RewriteRule directives!
- Note that, by default, rewrite configurations are not
- inherited. This means that you need to have a
+
Note that rewrite configurations are not
+ inherited by virtual hosts. This means that you need to have a
RewriteEngine on directive for each virtual host
- in which you wish to use it.
+ in which you wish to use rewrite rules.
@@ -1361,6 +1375,10 @@ cannot use $N in the substitution string!
URL-to-filename translators. The typical example
is the use of mod_alias and
mod_rewrite.
+
+ The PT flag implies the L flag:
+ rewriting will be stopped in order to pass the request to
+ the next phase of processing.
'qsappend|QSA'
diff --git a/docs/manual/programs/httpd.html.en b/docs/manual/programs/httpd.html.en
index 666bd18af1b..f44e09982a7 100644
--- a/docs/manual/programs/httpd.html.en
+++ b/docs/manual/programs/httpd.html.en
@@ -94,8 +94,11 @@ files.
Sets a configuration parameter which can be used with
<IfDefine> sections
-in the configuration files to conditionally skip or process
-commands at server startup and restart.
+in the configuration files to conditionally skip or process commands
+at server startup and restart. Also can be used to set certain
+less-common startup parameters including -DNO_DETACH
+(prevent the parent from forking) and -DFOREGROUND
+(prevent the parent from calling setsid() et al).
-e level
diff --git a/docs/manual/programs/httpd.xml b/docs/manual/programs/httpd.xml
index adf08947f86..598421eec25 100644
--- a/docs/manual/programs/httpd.xml
+++ b/docs/manual/programs/httpd.xml
@@ -105,8 +105,11 @@ files.
Sets a configuration parameter which can be used with
IfDefine sections
-in the configuration files to conditionally skip or process
-commands at server startup and restart.
+in the configuration files to conditionally skip or process commands
+at server startup and restart. Also can be used to set certain
+less-common startup parameters including -DNO_DETACH
+(prevent the parent from forking) and -DFOREGROUND
+(prevent the parent from calling setsid() et al).
-e level
--
2.47.3