From faf86a24fdbe86e2b79ef2d6c582cbbe9e816816 Mon Sep 17 00:00:00 2001 From: Joshua Slive Date: Thu, 22 Aug 2002 02:53:02 +0000 Subject: Update the environment variable docs with a couple new special-purpose variables and a reference to the mod_ext_filter use of env variables. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96481 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/env.html.en | 75 +++++++++++++++++++++++++++++++++++++------------ docs/manual/env.xml | 44 ++++++++++++++++++++++++++++- 2 files changed, 100 insertions(+), 19 deletions(-) diff --git a/docs/manual/env.html.en b/docs/manual/env.html.en index 34caa7aaaa..1b231c0f3b 100644 --- a/docs/manual/env.html.en +++ b/docs/manual/env.html.en @@ -2,7 +2,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX This file is generated from xml source: DO NOT EDIT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - -->Environment Variables in Apache - Apache HTTP Server
[APACHE DOCUMENTATION]

Apache HTTP Server Version 2.0

Environment Variables in Apache

+ -->Environment Variables in Apache - Apache HTTP Server
[APACHE DOCUMENTATION]

Apache HTTP Server Version 2.0

Environment Variables in Apache

The Apache HTTP Server provides a mechanism for storing information in named variables that are called environment variables. This information can be used to control various @@ -22,17 +22,17 @@ server itself runs, you must use the standard environment manipulation mechanisms provided by your operating system shell.

-

Setting Environment Variables

+

Setting Environment Variables

-
Related Modules

mod_env
mod_rewrite
mod_setenvif
mod_unique_id
Related Directives

BrowserMatch
BrowserMatchNoCase
PassEnv
RewriteRule
SetEnv
SetEnvIf
SetEnvIfNoCase
UnsetEnv
+
Related Modules

mod_env
mod_rewrite
mod_setenvif
mod_unique_id
Related Directives

BrowserMatch
BrowserMatchNoCase
PassEnv
RewriteRule
SetEnv
SetEnvIf
SetEnvIfNoCase
UnsetEnv

Basic Environment Manipulation

The most basic way to set an environment variable in Apache - is using the unconditional SetEnv directive. Variables may also be passed from + is using the unconditional SetEnv directive. Variables may also be passed from the environment of the shell which started the server using the - PassEnv directive.

+ PassEnv directive.

Conditional Per-Request Settings

@@ -44,7 +44,7 @@ requests. For example, a variable could be set only when a specific browser (User-Agent) is making a request, or only when a specific Referer [sic] header is found. Even more flexibility - is available through the mod_rewrite's RewriteRule which uses the + is available through the mod_rewrite's RewriteRule which uses the [E=...] option to set environment variables.

@@ -92,7 +92,7 @@

Using Environment Variables

-
Related Modules

mod_access
mod_cgi
mod_headers
mod_include
mod_log_config
mod_rewrite
Related Directives

Allow
CustomLog
Deny
Header
LogFormat
RewriteCond
RewriteRule
+
Related Modules

mod_access
mod_cgi
mod_ext_filter
mod_headers
mod_include
mod_log_config
mod_rewrite
Related Directives

Allow
CustomLog
Deny
ExtFilterDefine
Header
LogFormat
RewriteCond
RewriteRule

CGI Scripts

@@ -123,7 +123,7 @@

Access to the server can be controlled based on the value of environment variables using the allow from env= and deny from env= directives. In combination with - SetEnvIf, this + SetEnvIf, this allows for flexible control of access to the server based on characteristics of the client. For example, you can use these directives to deny access to a particular browser (User-Agent). @@ -134,12 +134,12 @@

Environment variables can be logged in the access log using - the LogFormat + the LogFormat option %e. In addition, the decision on whether or not to log requests can be made based on the status of environment variables using the conditional form of the - CustomLog - directive. In combination with SetEnvIf this allows for flexible control of which + CustomLog + directive. In combination with SetEnvIf this allows for flexible control of which requests are logged. For example, you can choose not to log requests for filenames ending in gif, or you can choose to only log requests from clients which are outside your @@ -149,7 +149,7 @@

Conditional Response Headers

-

The Header +

The Header directive can use the presence or absence of an environment variable to determine whether or not a certain HTTP header will be placed in the response to the @@ -158,11 +158,21 @@ request from the client.

+ +

External Filter Activation

+ + +

External filters configured by mod_ext_filter + using the ExtFilterDefine directive can + by activated conditional on an environment variable using the + disableenv= and enableenv= options.

+ +

URL Rewriting

The %{ENV:...} form of TestString in - the RewriteCond + the RewriteCond allows mod_rewrite's rewrite engine to make decisions conditional on environment variables. Note that the variables accessible in mod_rewrite without the @@ -177,9 +187,9 @@ mechanisms to modify the way Apache behaves when talking to particular clients. To make these mechanisms as flexible as possible, they are invoked by defining environment variables, - typically with BrowserMatch, - though SetEnv and - PassEnv could also be used, + typically with BrowserMatch, + though SetEnv and + PassEnv could also be used, for example.

downgrade-1.0

@@ -208,11 +218,19 @@ clients may not behave correctly when given an HTTP/1.1 response, and this can be used to interoperate with them.

+ +

gzip-only-text/html

+ + +

When set to a value of "1", this variable disables the DEFLATE + output filter provided by mod_deflate for + content-types other than text/html.

+

nokeepalive

-

This disables KeepAlive when set.

+

This disables KeepAlive when set.

redirect-carefully

@@ -226,6 +244,27 @@ methods.

+ +

suppress-error-charset

+ + +

Available in versions after 2.0.40

+ +

When Apache issues a redirect in response to a client request, + the response includes some actual text to be displayed in case + the client can't (or doesn't) automatically follow the redirection. + Apache ordinarily labels this text according to the character set + which it uses, which is ISO-8859-1.

+

However, if the redirection is to a page that uses a different + character set, some broken browser versions will try to use the + character set from the redirection text rather than the actual page. + This can result in Greek, for instance, being incorrectly rendered.

+

Setting this environment variable causes Apache to omit the character + set for the redirection text, and these broken browsers will then correctly + use that of the destination page.

+ + +

Examples

@@ -292,4 +331,4 @@ SetEnvIf Referer "^$" local_referal ApacheToday tutorial " Keeping Your Images from Adorning Other Sites".

-

Apache HTTP Server Version 2.0

IndexHome \ No newline at end of file +

Apache HTTP Server Version 2.0

IndexHome \ No newline at end of file diff --git a/docs/manual/env.xml b/docs/manual/env.xml index 583dc4e435..3e398a7c70 100644 --- a/docs/manual/env.xml +++ b/docs/manual/env.xml @@ -123,6 +123,7 @@ mod_access mod_cgi + mod_ext_filter mod_headers mod_include mod_log_config @@ -132,6 +133,7 @@ Allow CustomLog Deny + ExtFilterDefine Header LogFormat RewriteCond @@ -205,6 +207,17 @@ request from the client.

+ +
+ External Filter Activation + +

External filters configured by mod_ext_filter + using the ExtFilterDefine directive can + by activated conditional on an environment variable using the + disableenv= and enableenv= options.

+
+
URL Rewriting @@ -257,8 +270,16 @@ implemented as a result of a problem with AOL's proxies. Some clients may not behave correctly when given an HTTP/1.1 response, and this can be used to interoperate with them.

-
+ +
+ gzip-only-text/html + +

When set to a value of "1", this variable disables the DEFLATE + output filter provided by mod_deflate for + content-types other than text/html.

+
+
nokeepalive @@ -276,6 +297,27 @@ methods.

+ +
+ suppress-error-charset + +

Available in versions after 2.0.40

+ +

When Apache issues a redirect in response to a client request, + the response includes some actual text to be displayed in case + the client can't (or doesn't) automatically follow the redirection. + Apache ordinarily labels this text according to the character set + which it uses, which is ISO-8859-1.

+

However, if the redirection is to a page that uses a different + character set, some broken browser versions will try to use the + character set from the redirection text rather than the actual page. + This can result in Greek, for instance, being incorrectly rendered.

+

Setting this environment variable causes Apache to omit the character + set for the redirection text, and these broken browsers will then correctly + use that of the destination page.

+ +
+
-- cgit v1.2.3