2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_env.xml.meta">
26 <description>Modifies the environment which is passed to CGI scripts and
27 SSI pages</description>
29 <sourcefile>mod_env.c</sourcefile>
30 <identifier>env_module</identifier>
32 <p>This module allows for control of the environment that will
33 be provided to CGI scripts and SSI pages. Environment variables
34 may be passed from the shell which invoked the <program>httpd</program>
35 process. Alternatively, environment variables may be set or unset within
36 the configuration process.</p>
38 <seealso><a href="../env.html">Environment Variables</a></seealso>
42 <description>Passes environment variables from the shell</description>
43 <syntax>PassEnv <var>env-variable</var> [<var>env-variable</var>]
45 <contextlist><context>server config</context><context>virtual host</context>
46 <context>directory</context><context>.htaccess</context></contextlist>
47 <override>FileInfo</override>
50 <p>Specifies one or more environment variables to pass to CGI
51 scripts and SSI pages from the environment of the shell which
52 invoked the <program>httpd</program> process.</p>
54 <example><title>Example</title>
55 PassEnv LD_LIBRARY_PATH
62 <description>Sets environment variables</description>
63 <syntax>SetEnv <var>env-variable</var> <var>value</var></syntax>
64 <contextlist><context>server config</context><context>virtual host</context>
65 <context>directory</context><context>.htaccess</context></contextlist>
66 <override>FileInfo</override>
69 <p>Sets an environment variable, which is then passed on to CGI
70 scripts and SSI pages.</p>
72 <example><title>Example</title>
73 SetEnv SPECIAL_PATH /foo/bin
76 <note><p>The internal environment variables set by this directive are set
77 <em>after</em> most early request processing directives are run, such as access
78 control and URI-to-filename mapping. If the environment variable you're
79 setting is meant as input into this early phase of processing such as the
80 <directive module="mod_rewrite">RewriteRule</directive> directive, you should
81 instead set the environment variable with
82 <directive module="mod_setenvif"> SetEnvIf</directive>.</p>
90 <description>Removes variables from the environment</description>
91 <syntax>UnsetEnv <var>env-variable</var> [<var>env-variable</var>]
93 <contextlist><context>server config</context><context>virtual host</context>
94 <context>directory</context><context>.htaccess</context></contextlist>
95 <override>FileInfo</override>
98 <p>Removes one or more environment variables from those passed
99 on to CGI scripts and SSI pages.</p>
101 <example><title>Example</title>
102 UnsetEnv LD_LIBRARY_PATH