From: Joshua Slive 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
@@ -24,15 +24,15 @@
shell. The most basic way to set an environment variable in Apache
- is using the unconditional ![[APACHE DOCUMENTATION]](../images/sub.gif)
Apache HTTP Server Version 2.0
Environment Variables in Apache
+ -->![[APACHE DOCUMENTATION]](./images/sub.gif)
Apache HTTP Server Version 2.0
Environment Variables in Apache
Setting Environment Variables
-
+ Related Modules mod_envmod_rewritemod_setenvifmod_unique_idRelated Directives BrowserMatchBrowserMatchNoCasePassEnvRewriteRuleSetEnvSetEnvIfSetEnvIfNoCaseUnsetEnvRelated Modules mod_envmod_rewritemod_setenvifmod_unique_idRelated Directives BrowserMatchBrowserMatchNoCasePassEnvRewriteRuleSetEnvSetEnvIfSetEnvIfNoCaseUnsetEnvBasic Environment Manipulation
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.
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 @@
Related Modulesmod_accessmod_cgimod_ext_filtermod_headersmod_includemod_log_configmod_rewrite | Related DirectivesAllowCustomLogDenyExtFilterDefineHeaderLogFormatRewriteCondRewriteRule |
Related Modulesmod_accessmod_cgimod_ext_filtermod_headersmod_includemod_log_configmod_rewrite | Related DirectivesAllowCustomLogDenyExtFilterDefineHeaderLogFormatRewriteCondRewriteRule |
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 @@
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
@@ -162,8 +162,8 @@
External filters configured by mod_ext_filter
- using the ExtFilterDefine directive can
+
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.
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
@@ -187,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.
When set to a value of "1", this variable disables the DEFLATE
- output filter provided by mod_deflate for
+ output filter provided by mod_deflate for
content-types other than text/html.
This disables KeepAlive when set.
This disables KeepAlive when set.

