mod_env.html.en revision 0d0ba3a410038e179b695446bb149cce6264e0ab
97a9a944b5887e91042b019776c41d5dd74557aferikabele<?xml version="1.0" encoding="ISO-8859-1"?>
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 -->
b686b6a420bde7f78c416b90be11db94cb789979nd<title>mod_env - Apache HTTP Server</title>
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">
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen</script>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
b686b6a420bde7f78c416b90be11db94cb789979nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
b686b6a420bde7f78c416b90be11db94cb789979nd<body>
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="page-header">
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.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>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<p class="apache">Apache HTTP Server Version 2.5</p>
b686b6a420bde7f78c416b90be11db94cb789979nd<img alt="" src="/images/feather.gif" /></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="path">
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="page-content">
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="preamble"><h1>Apache Module mod_env</h1>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<div class="toplang">
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/en/mod/mod_env.html" title="English">&nbsp;en&nbsp;</a> |
0066eddda7203f6345b56f77d146a759298dc635gryzor<a href="/fr/mod/mod_env.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd<a href="/ja/mod/mod_env.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
f3ec420152ca921e4c1ce77782f51b53f659018dnd<a href="/ko/mod/mod_env.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/tr/mod/mod_env.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd</div>
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
b686b6a420bde7f78c416b90be11db94cb789979ndSSI pages</td></tr>
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>
b686b6a420bde7f78c416b90be11db94cb789979nd<h3>Summary</h3>
b686b6a420bde7f78c416b90be11db94cb789979nd
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>
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="quickview"><h3 class="directives">Directives</h3>
b686b6a420bde7f78c416b90be11db94cb789979nd<ul id="toc">
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>
b686b6a420bde7f78c416b90be11db94cb789979nd</ul>
b686b6a420bde7f78c416b90be11db94cb789979nd<h3>See also</h3>
b686b6a420bde7f78c416b90be11db94cb789979nd<ul class="seealso">
b686b6a420bde7f78c416b90be11db94cb789979nd<li><a href="/env.html">Environment Variables</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
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<table class="directive">
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...</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>
b686b6a420bde7f78c416b90be11db94cb789979nd</table>
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 propogated 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>
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd
e487d6c09669296f94a5190cc34586a98e624a00nd <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd PassEnv LD_LIBRARY_PATH
17ade6df5ec233536985eb1c130a906c725dd614humbedooh </pre>
e487d6c09669296f94a5190cc34586a98e624a00nd</div>
b686b6a420bde7f78c416b90be11db94cb789979nd
b686b6a420bde7f78c416b90be11db94cb789979nd</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="SetEnv" id="SetEnv">SetEnv</a> <a name="setenv" id="setenv">Directive</a></h2>
b686b6a420bde7f78c416b90be11db94cb789979nd<table class="directive">
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>
b686b6a420bde7f78c416b90be11db94cb789979nd</table>
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>
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd
e487d6c09669296f94a5190cc34586a98e624a00nd <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd SetEnv SPECIAL_PATH /foo/bin
17ade6df5ec233536985eb1c130a906c725dd614humbedooh </pre>
e487d6c09669296f94a5190cc34586a98e624a00nd</div>
b686b6a420bde7f78c416b90be11db94cb789979nd
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener <div class="note"><p>The internal environment variables set by this directive are set
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener <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
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <code class="directive"><a href="/mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive, you should
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener instead set the environment variable with
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener <code class="directive"><a href="/mod/mod_setenvif.html# setenvif"> SetEnvIf</a></code>.</p>
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener </div>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen<h3>See also</h3>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen<ul>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen<li><a href="/env.html">Environment Variables</a></li>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen</ul>
b686b6a420bde7f78c416b90be11db94cb789979nd</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="UnsetEnv" id="UnsetEnv">UnsetEnv</a> <a name="unsetenv" id="unsetenv">Directive</a></h2>
b686b6a420bde7f78c416b90be11db94cb789979nd<table class="directive">
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...</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>
b686b6a420bde7f78c416b90be11db94cb789979nd</table>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen <p>Removes one or more internal environment variables from those passed
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd on to CGI scripts and SSI pages.</p>
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd
e487d6c09669296f94a5190cc34586a98e624a00nd <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd UnsetEnv LD_LIBRARY_PATH
17ade6df5ec233536985eb1c130a906c725dd614humbedooh </pre>
e487d6c09669296f94a5190cc34586a98e624a00nd</div>
b686b6a420bde7f78c416b90be11db94cb789979nd
b686b6a420bde7f78c416b90be11db94cb789979nd</div>
b686b6a420bde7f78c416b90be11db94cb789979nd</div>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<div class="bottomlang">
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/en/mod/mod_env.html" title="English">&nbsp;en&nbsp;</a> |
0066eddda7203f6345b56f77d146a759298dc635gryzor<a href="/fr/mod/mod_env.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd<a href="/ja/mod/mod_env.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
f3ec420152ca921e4c1ce77782f51b53f659018dnd<a href="/ko/mod/mod_env.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/tr/mod/mod_env.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh</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>This section is experimental!</strong><br />Comments placed here should not be expected
19737f4fbef1805f9c3e9e045bb6d710a1e5e10fhumbedoohto last beyond the testing phase of this system, nor do we in any way guarantee that we'll read them.</div>
0d0ba3a410038e179b695446bb149cce6264e0abnd<script type="text/javascript"><!--//--><![CDATA[//><!--
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohvar disqus_shortname = 'httpd';
0d0ba3a410038e179b695446bb149cce6264e0abndvar disqus_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_env.html.en';
0d0ba3a410038e179b695446bb149cce6264e0abnd(function(w, d) {
0d0ba3a410038e179b695446bb149cce6264e0abnd if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
0d0ba3a410038e179b695446bb149cce6264e0abnd d.write('<div id="disqus_thread"><\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd var s = d.createElement('script');
0d0ba3a410038e179b695446bb149cce6264e0abnd s.type = 'text/javascript';
0d0ba3a410038e179b695446bb149cce6264e0abnd s.async = true;
0d0ba3a410038e179b695446bb149cce6264e0abnd s.src = 'http' + '://' + disqus_shortname + '.disqus.com/embed.js';
0d0ba3a410038e179b695446bb149cce6264e0abnd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
0d0ba3a410038e179b695446bb149cce6264e0abnd }
0d0ba3a410038e179b695446bb149cce6264e0abnd else {
0d0ba3a410038e179b695446bb149cce6264e0abnd d.write('<div id="disqus_thread">Comments have been disabled for offline viewing.<\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd }
0d0ba3a410038e179b695446bb149cce6264e0abnd})(window, document);
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh//--><!]]></script></div><div id="footer">
5effc8b39fae5cd169d17f342bfc265705840014rbowen<p class="apache">Copyright 2012 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>
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.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[//><!--
0d0ba3a410038e179b695446bb149cce6264e0abndif (typeof(prettyPrint) !== 'undefined') {
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd prettyPrint();
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd}
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd//--><!]]></script>
b686b6a420bde7f78c416b90be11db94cb789979nd</body></html>