Commit 0663d975 authored by Joshua Slive's avatar Joshua Slive
Browse files

Explain the difference between the Apache environment and

the OS environment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89023 13f79535-47bb-0310-9956-ffa450edef68
parent 6539b8ca
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -15,11 +15,23 @@
<!--#include virtual="header.html" -->
<h1 align="center">Environment Variables in Apache</h1>

<p>Many operating systems provide a facility for storage and
transmission of information called environment variables.  Apache uses
environment variables in many ways to control operations and to
communicate with other programs like CGI scripts.  This document
explains some of the ways to use environment variables in Apache.</p>
<p>The Apache HTTP Server provides a mechanism for storing information
in named variables that are called <em>environment variables</em>.
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
document discusses different ways to manipulate and use these
variables.</p>

<p>Although these variables are referred to as <em>environment
variables</em>, 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.</p>

<ul>
<li><a href="#setting">Setting Environment Variables</a></li>
@@ -145,7 +157,7 @@ For more details, see the <a href="howto/cgi.html">CGI tutorial</a>.
<h3>SSI Pages</h3>

<p>Server-parsed (SSI) documents processed by mod_include's
<code>server-parsed</code> handler can print environment variables
<code>INCLUDES</code> filter can print environment variables
using the <code>echo</code> element, and can use environment variables
in flow control elements to makes parts of a page conditional on
characteristics of a request.  Apache also provides SSI pages with the
+18 −6
Original line number Diff line number Diff line
@@ -15,11 +15,23 @@
<!--#include virtual="header.html" -->
<h1 align="center">Environment Variables in Apache</h1>

<p>Many operating systems provide a facility for storage and
transmission of information called environment variables.  Apache uses
environment variables in many ways to control operations and to
communicate with other programs like CGI scripts.  This document
explains some of the ways to use environment variables in Apache.</p>
<p>The Apache HTTP Server provides a mechanism for storing information
in named variables that are called <em>environment variables</em>.
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
document discusses different ways to manipulate and use these
variables.</p>

<p>Although these variables are referred to as <em>environment
variables</em>, 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.</p>

<ul>
<li><a href="#setting">Setting Environment Variables</a></li>
@@ -145,7 +157,7 @@ For more details, see the <a href="howto/cgi.html">CGI tutorial</a>.
<h3>SSI Pages</h3>

<p>Server-parsed (SSI) documents processed by mod_include's
<code>server-parsed</code> handler can print environment variables
<code>INCLUDES</code> filter can print environment variables
using the <code>echo</code> element, and can use environment variables
in flow control elements to makes parts of a page conditional on
characteristics of a request.  Apache also provides SSI pages with the