mod_env.html revision 44afbb2bc1622ddf021058e2a157cfd31fb67fd0
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase<HTML>
56e62cb381abc3cf1cdbdcbd7b9d30dd4f252ac0Tim Reddehase<HEAD>
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase<TITLE>Apache module mod_env</TITLE>
56e62cb381abc3cf1cdbdcbd7b9d30dd4f252ac0Tim Reddehase</HEAD>
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehase
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehase<BODY>
67ea9fccbdc154cf2418f16ab8883ccfcbc77b51Model Renamer<!--#include virtual="header.html" -->
67ea9fccbdc154cf2418f16ab8883ccfcbc77b51Model Renamer<H1>Apache module mod_env</h1>
67ea9fccbdc154cf2418f16ab8883ccfcbc77b51Model Renamer
a2968004a4bf86e17427f1237367611d7184c34cTim ReddehaseThis module is contained in the <code>mod_env.c</code> file, and
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehaseis not compiled in by default. It provides for
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehasepassing environment variables to CGI/SSI scripts. Is is only available
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehasein Apache 1.1 and later.
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase<h2>Summary</h2>
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase
c5c112a316f8234341512d05ee688d0d89c25852Tim ReddehaseThis module allows Apache's CGI and SSI environment to inherit
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehaseenvironment variables from the shell which invoked the httpd process.
67ea9fccbdc154cf2418f16ab8883ccfcbc77b51Model RenamerCERN web-servers are able to do this, so this module is especially
c93931e2810cdf6958866ccb68fcf03ac69bca48Tim Reddehaseuseful to web-admins who wish to migrate from CERN to Apache without
c93931e2810cdf6958866ccb68fcf03ac69bca48Tim Reddehaserewriting all their scripts
c93931e2810cdf6958866ccb68fcf03ac69bca48Tim Reddehase
c93931e2810cdf6958866ccb68fcf03ac69bca48Tim Reddehase<h2>Directives</h2>
c93931e2810cdf6958866ccb68fcf03ac69bca48Tim Reddehase<ul>
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase<li><A HREF="#passenv">PassEnv</A>
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehase<li><A HREF="#setenv">SetEnv</A>
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase</ul>
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase<hr>
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehase<A name="passenv"><h2>PassEnv</h2></A>
c726141914f758822206c1e8ac2c56434ae5eac7Tim Reddehase<strong>Syntax:</strong> PassEnv <em>variable</em><br>
c726141914f758822206c1e8ac2c56434ae5eac7Tim Reddehase<strong>Context:</strong> server config, virtual host<br>
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehase<strong>Status:</strong> Base<br>
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehase<strong>Module:</strong> mod_env<br>
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehase<strong>Compatibility:</strong> PassEnv is only available in
a2968004a4bf86e17427f1237367611d7184c34cTim ReddehaseApache 1.1 and later.<p>
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehase
56e62cb381abc3cf1cdbdcbd7b9d30dd4f252ac0Tim ReddehasePasses an environment variable to CGI scripts from the server's own
a2968004a4bf86e17427f1237367611d7184c34cTim Reddehaseenvironment. Example:
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase<pre>
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase PassEnv LD_LIBRARY_PATH
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase</pre>
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase<A name="setenv"><h2>SetEnv</h2></A>
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase<strong>Syntax:</strong> SetEnv <em>variable value</em><br>
c5c112a316f8234341512d05ee688d0d89c25852Tim Reddehase<strong>Context:</strong> server config, virtual host<br>
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase<strong>Status:</strong> Base<br>
2220c4c7ba19bd297e21b41c95455d64dc42bc1dTim Reddehase<strong>Module:</strong> mod_env<br>
2220c4c7ba19bd297e21b41c95455d64dc42bc1dTim Reddehase<strong>Compatibility:</strong> SetEnv is only available in
2220c4c7ba19bd297e21b41c95455d64dc42bc1dTim ReddehaseApache 1.1 and later.<p>
2220c4c7ba19bd297e21b41c95455d64dc42bc1dTim Reddehase
2220c4c7ba19bd297e21b41c95455d64dc42bc1dTim ReddehaseSets an environment variable, which is then passed on to CGI
2220c4c7ba19bd297e21b41c95455d64dc42bc1dTim Reddehasescripts. Example:
2220c4c7ba19bd297e21b41c95455d64dc42bc1dTim Reddehase<pre>
2220c4c7ba19bd297e21b41c95455d64dc42bc1dTim Reddehase SetEnv SPECIAL_PATH /foo/bin
bf9360b5451413accdcc660097abac4afe3b67acTim Reddehase</pre>
54a29722dfa065180318512e96fd2fd9fee3b453Tim Reddehase
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase<p>
d1f804c1eb7c2526a77be4c9683e96e3c176c7c1Tim Reddehase
9f939bed54fff56da9171031b6f5ce4413d34c63Tim Reddehase<!--#include virtual="footer.html" -->
9f939bed54fff56da9171031b6f5ce4413d34c63Tim Reddehase</BODY>
9f939bed54fff56da9171031b6f5ce4413d34c63Tim Reddehase</HTML>
9f939bed54fff56da9171031b6f5ce4413d34c63Tim Reddehase
583bb130a395691b9f30281ed710c0f2783c20edTim Reddehase