mod_env.html.en revision 6cd2ba3ebab8e247d7047889e8ceab19b7fc08de
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
97a9a944b5887e91042b019776c41d5dd74557aferikabele<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive This file is generated from xml source: DO NOT EDIT
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
b686b6a420bde7f78c416b90be11db94cb789979nd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
b686b6a420bde7f78c416b90be11db94cb789979nd<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<script src="/style/scripts/prettify.js" type="text/javascript">
b686b6a420bde7f78c416b90be11db94cb789979nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.5</a> > <a href="./">Modules</a></div>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/en/mod/mod_env.html" title="English"> en </a> |
0066eddda7203f6345b56f77d146a759298dc635gryzor<a href="/fr/mod/mod_env.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd<a href="/ja/mod/mod_env.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
f3ec420152ca921e4c1ce77782f51b53f659018dnd<a href="/ko/mod/mod_env.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/tr/mod/mod_env.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
b686b6a420bde7f78c416b90be11db94cb789979nd<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Modifies the environment which is passed to CGI scripts and
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>env_module</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_env.c</td></tr></table>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen <p>This module allows for control of internal environment variables that
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen are used by various Apache HTTP Server modules. These variables are also
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen provided to CGI scripts as native system environment variables, and available
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf for use in SSI pages. Environment variables may be passed from the shell
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf which invoked the <code class="program"><a href="/programs/httpd.html">httpd</a></code> process. Alternatively,
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen environment variables may be set or unset within the configuration process.</p>
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="quickview"><h3 class="directives">Directives</h3>
b686b6a420bde7f78c416b90be11db94cb789979nd<li><img alt="" src="/images/down.gif" /> <a href="#passenv">PassEnv</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#setenv">SetEnv</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#unsetenv">UnsetEnv</a></li>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen<li><code class="directive"><a href="/mod/mod_setenvif.html#setenvif">SetEnvIf</a></code></li>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="directive-section"><h2><a name="PassEnv" id="PassEnv">PassEnv</a> <a name="passenv" id="passenv">Directive</a></h2>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Passes environment variables from the shell</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>PassEnv <var>env-variable</var> [<var>env-variable</var>]
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_env</td></tr>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen <p>Specifies one or more native system environment variables to make available
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen as internal environment variables, which are available to Apache HTTP Server modules
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf as well as propagated to CGI scripts and SSI pages. Values come from the
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf native OS environment of the shell which invoked the
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen <code class="program"><a href="/programs/httpd.html">httpd</a></code> process.</p>
e487d6c09669296f94a5190cc34586a98e624a00nd <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd PassEnv LD_LIBRARY_PATH
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="directive-section"><h2><a name="SetEnv" id="SetEnv">SetEnv</a> <a name="setenv" id="setenv">Directive</a></h2>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets environment variables</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetEnv <var>env-variable</var> [<var>value</var>]</code></td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_env</td></tr>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <p>Sets an internal environment variable, which is then available to Apache
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen HTTP Server modules, and passed on to CGI scripts and SSI pages.</p>
e487d6c09669296f94a5190cc34586a98e624a00nd <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener <p> If you omit the <var>value</var> argument, the variable is set to
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener an empty string.</p>
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener <div class="note"><p>The internal environment variables set by this directive are set
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <em>after</em> most early request processing directives are run, such as access
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener control and URI-to-filename mapping. If the environment variable you're
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener setting is meant as input into this early phase of processing such as the
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener <code class="directive"><a href="/mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive, you should
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf instead set the environment variable with
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener <code class="directive"><a href="/mod/mod_setenvif.html#setenvif">SetEnvIf</a></code>.</p>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="directive-section"><h2><a name="UnsetEnv" id="UnsetEnv">UnsetEnv</a> <a name="unsetenv" id="unsetenv">Directive</a></h2>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Removes variables from the environment</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UnsetEnv <var>env-variable</var> [<var>env-variable</var>]
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_env</td></tr>
e487d6c09669296f94a5190cc34586a98e624a00nd <p>Removes one or more internal environment variables from those passed
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd on to CGI scripts and SSI pages.</p>
e487d6c09669296f94a5190cc34586a98e624a00nd <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
b686b6a420bde7f78c416b90be11db94cb789979nd UnsetEnv LD_LIBRARY_PATH
f3ec420152ca921e4c1ce77782f51b53f659018dnd<p><span>Available Languages: </span><a href="/en/mod/mod_env.html" title="English"> en </a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/fr/mod/mod_env.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
727872d18412fc021f03969b8641810d8896820bhumbedooh<a href="/ja/mod/mod_env.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
0d0ba3a410038e179b695446bb149cce6264e0abnd<a href="/ko/mod/mod_env.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
727872d18412fc021f03969b8641810d8896820bhumbedooh<a href="/tr/mod/mod_env.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
727872d18412fc021f03969b8641810d8896820bhumbedooh</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
727872d18412fc021f03969b8641810d8896820bhumbedoohvar comments_shortname = 'httpd';
888cb40bdeec5abf452bd85d6bf63b26d5913d4chumbedoohvar comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_env.html';
727872d18412fc021f03969b8641810d8896820bhumbedooh(function(w, d) {
0d0ba3a410038e179b695446bb149cce6264e0abnd if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
0d0ba3a410038e179b695446bb149cce6264e0abnd d.write('<div id="comments_thread"><\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd var s = d.createElement('script');
0d0ba3a410038e179b695446bb149cce6264e0abnd s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
0d0ba3a410038e179b695446bb149cce6264e0abnd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
0d0ba3a410038e179b695446bb149cce6264e0abnd d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
5effc8b39fae5cd169d17f342bfc265705840014rbowen})(window, document);
0d0ba3a410038e179b695446bb149cce6264e0abnd<p class="apache">Copyright 2013 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndif (typeof(prettyPrint) !== 'undefined') {
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd prettyPrint();