- publishing free software manuals
The Apache HTTP Server Reference Manual
by Apache Software Foundation
Paperback (6"x9"), 862 pages
ISBN 9781906966034
RRP £19.95 ($29.95)

Get a printed copy>>>

19  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 operations such as logging or access control. The variables are also used as a mechanism to communicate with external programs such as CGI scripts. This section discusses different ways to manipulate and use these variables.

Although these variables are referred to as environment variables, they are not the same as the environment variables controlled by the underlying operating system. Instead, these variables are stored and manipulated in an internal Apache structure. They only become actual operating system environment variables when they are provided to CGI scripts and Server Side Include scripts. If you wish to manipulate the operating system environment under which the server itself runs, you must use the standard environment manipulation mechanisms provided by your operating system shell.

 19.1  Setting Environment Variables
  19.1.1  Basic Environment Manipulation
  19.1.2  Conditional Per-Request Settings
  19.1.3  Unique Identifiers
  19.1.4  Standard CGI Variables
  19.1.5  Some Caveats
 19.2  Using Environment Variables
  19.2.1  CGI Scripts
  19.2.2  SSI Pages
  19.2.3  Access Control
  19.2.4  Conditional Logging
  19.2.5  Conditional Response Headers
  19.2.6  External Filter Activation
  19.2.7  URL Rewriting
 19.3  Special Purpose Environment Variables
  19.3.1  downgrade-1.0
  19.3.2  force-gzip
  19.3.3  force-no-vary
  19.3.4  force-response-1.0
  19.3.5  gzip-only-text/html
  19.3.6  no-gzip
  19.3.7  no-cache
  19.3.8  nokeepalive
  19.3.9  prefer-language
  19.3.10  redirect-carefully
  19.3.11  suppress-error-charset
  19.3.12  force-proxy-request-1.0, proxy-nokeepalive, proxy-sendchunked, proxy-sendcl, proxy-chain-auth, proxy-interim-response, proxy-initial-not-pooled
 19.4  Examples
  19.4.1  Changing protocol behavior with misbehaving clients
  19.4.2  Do not log requests for images in the access log
  19.4.3  Prevent "Image Theft"

ISBN 9781906966034The Apache HTTP Server Reference ManualSee the print edition