From bab82a544a80d8b3fcbb0c65b29f57cc95c65c8a Mon Sep 17 00:00:00 2001 From: Jacob Champion Date: Fri, 10 Feb 2017 22:56:45 +0000 Subject: [PATCH] docs: add more notes on ProxyFCGISetEnvIf Also fix up a couple typos. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782538 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_proxy_fcgi.xml | 31 +++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/docs/manual/mod/mod_proxy_fcgi.xml b/docs/manual/mod/mod_proxy_fcgi.xml index fd756e6f06..df8b69d6bf 100644 --- a/docs/manual/mod/mod_proxy_fcgi.xml +++ b/docs/manual/mod/mod_proxy_fcgi.xml @@ -209,7 +209,7 @@ ProxyPass "/myapp/" "balancer://myappcluster/"

This directive allows the type of backend FastCGI application to be specified. Some FastCGI servers, such as PHP-FPM, use historical quirks of environment variables to identify the type of proxy server being used. Set -this direcive to "GENERIC" if your non PHP-FPM application has trouble +this directive to "GENERIC" if your non PHP-FPM application has trouble interpreting environment variables such as SCRIPT_FILENAME or PATH_TRANSLATED as set by the server.

@@ -257,7 +257,7 @@ the condition expressions and value expressions.

Parameter syntax:

conditional-expression
-
Specifies an expression that controls whether the environmen variable that +
Specifies an expression that controls whether the environment variable that follows will be modified. For information on the expression syntax, see the examples that follow or the full specification at the ap_expr documentation. @@ -267,9 +267,10 @@ the condition expressions and value expressions.

such as PATH_INFO. If preceded by an exclamation point, the variable will be unset.
value-expression
-
Specifies the replacement value for the preceding environment variable. Backreferences, such as "$1", -can be included from regular expression captures in conditional-expression. -If omitted, the variable is set to an empty string.
+
Specifies the replacement value for the preceding environment variable. + Backreferences, such as "$1", can be included from regular expression + captures in conditional-expression. If omitted, the variable is + set (or overridden) to an empty string — but see the Note below.
@@ -285,6 +286,26 @@ ProxyFCGISetEnvIf "reqenv('PATH_TRANSLATED') =~ m|(/.*prefix)(\d+)(.*)|" PATH_TR +Note: Unset vs. Empty + The following will unset VARIABLE, preventing it from being sent + to the FastCGI server: + + ProxyFCGISetEnvIf true !VARIABLE + + Whereas the following will erase any existing value of + VARIABLE (by setting it to the empty string), but the empty + VARIABLE will still be sent to the server: + + ProxyFCGISetEnvIf true VARIABLE + + The CGI/1.1 specification + does not + distinguish between a variable with an empty value and a variable that + does not exist. However, many CGI and FastCGI implementations distinguish (or + allow scripts to distinguish) between the two. The choice of which to use is + dependent upon your implementation and your reason for modifying the variable. + + -- 2.50.1