mod_env.html.en revision 727872d18412fc021f03969b8641810d8896820b
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">
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<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
00e022bc81666634bf78e9f18a8b492baa9607d8humbedooh 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>
7859c11126b92a9ff7ca9ebf9ec0c7dee8ddb70fcovener<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>
7859c11126b92a9ff7ca9ebf9ec0c7dee8ddb70fcovener
7859c11126b92a9ff7ca9ebf9ec0c7dee8ddb70fcovener <div class="note"><p>The internal environment variables set by this directive are set
7859c11126b92a9ff7ca9ebf9ec0c7dee8ddb70fcovener <em>after</em> most early request processing directives are run, such as access
b686b6a420bde7f78c416b90be11db94cb789979nd 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
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener instead set the environment variable with
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener <code class="directive"><a href="/mod/mod_setenvif.html# setenvif"> SetEnvIf</a></code>.</p>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf </div>
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener
6cd2ba3ebab8e247d7047889e8ceab19b7fc08dend
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener<h3>See also</h3>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf<ul>
c6e6ef7c81b1ac917bb7a994557908225bac491ecovener<li><a href="/env.html">Environment Variables</a></li>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen</ul>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen</div>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen<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>
b686b6a420bde7f78c416b90be11db94cb789979nd <p>Removes one or more internal environment variables from those passed
b686b6a420bde7f78c416b90be11db94cb789979nd on to CGI scripts and SSI pages.</p>
b686b6a420bde7f78c416b90be11db94cb789979nd
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd UnsetEnv LD_LIBRARY_PATH
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd </pre>
e487d6c09669296f94a5190cc34586a98e624a00nd</div>
e55e60efce8a3e2139132c1d6ad9f6f0d2976614nd
17ade6df5ec233536985eb1c130a906c725dd614humbedooh</div>
e487d6c09669296f94a5190cc34586a98e624a00nd</div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="bottomlang">
b686b6a420bde7f78c416b90be11db94cb789979nd<p><span>Available Languages: </span><a href="/en/mod/mod_env.html" title="English">&nbsp;en&nbsp;</a> |
b686b6a420bde7f78c416b90be11db94cb789979nd<a href="/fr/mod/mod_env.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a> |
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<a href="/ja/mod/mod_env.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<a href="/ko/mod/mod_env.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
0066eddda7203f6345b56f77d146a759298dc635gryzor<a href="/tr/mod/mod_env.html" hreflang="tr" rel="alternate" title="T�rk�e">&nbsp;tr&nbsp;</a></p>
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd</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&amp;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>
f3ec420152ca921e4c1ce77782f51b53f659018dnd<script type="text/javascript"><!--//--><![CDATA[//><!--
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjungvar comments_shortname = 'httpd';
727872d18412fc021f03969b8641810d8896820bhumbedoohvar comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_env.html.en';
0d0ba3a410038e179b695446bb149cce6264e0abnd(function(w, d) {
727872d18412fc021f03969b8641810d8896820bhumbedooh var disabled = false;
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh if (w.location.hostname.toLowerCase() == "httpd.apache.org" && disabled !== true) {
0d0ba3a410038e179b695446bb149cce6264e0abnd d.write('<div id="comments_thread"><\/div>');
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh var s = d.createElement('script');
727872d18412fc021f03969b8641810d8896820bhumbedooh s.type = 'text/javascript';
0d0ba3a410038e179b695446bb149cce6264e0abnd s.async = true;
0d0ba3a410038e179b695446bb149cce6264e0abnd s.src = 'http://c.apaste.info/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
0d0ba3a410038e179b695446bb149cce6264e0abnd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh }
0d0ba3a410038e179b695446bb149cce6264e0abnd else {
0d0ba3a410038e179b695446bb149cce6264e0abnd d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd }
727872d18412fc021f03969b8641810d8896820bhumbedooh})(window, document);
0d0ba3a410038e179b695446bb149cce6264e0abnd//--><!]]></script></div><div id="footer">
0d0ba3a410038e179b695446bb149cce6264e0abnd<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>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh<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[//><!--
1a1356f375e36db7bee379ea0684ab389579f798rbowenif (typeof(prettyPrint) !== 'undefined') {
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen prettyPrint();
0d0ba3a410038e179b695446bb149cce6264e0abnd}
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd//--><!]]></script>
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd</body></html>