You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sl...@apache.org on 2002/08/22 04:57:07 UTC

cvs commit: httpd-2.0/docs/manual env.html.en

slive       2002/08/21 19:57:07

  Modified:    docs/manual env.html.en
  Log:
  Darn.  There appears to be something wrong with the xml->html system.
  Rebuilding to get correct paths.
  
  Revision  Changes    Path
  1.26      +20 -20    httpd-2.0/docs/manual/env.html.en
  
  Index: env.html.en
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/env.html.en,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -d -b -u -r1.25 -r1.26
  --- env.html.en	22 Aug 2002 02:53:02 -0000	1.25
  +++ env.html.en	22 Aug 2002 02:57:07 -0000	1.26
  @@ -2,7 +2,7 @@
           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                 This file is generated from xml source: DO NOT EDIT
           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  -      --><title>Environment Variables in Apache - Apache HTTP Server</title><link href="../style/manual.css" type="text/css" rel="stylesheet"></head><body><blockquote><div align="center"><img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]"><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Environment Variables in Apache</h1>
  +      --><title>Environment Variables in Apache - Apache HTTP Server</title><link href="./style/manual.css" type="text/css" rel="stylesheet"></head><body><blockquote><div align="center"><img src="./images/sub.gif" alt="[APACHE DOCUMENTATION]"><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Environment Variables in Apache</h1>
       <p>The Apache HTTP Server provides a mechanism for storing
       information in named variables that are called <em>environment
       variables</em>. This information can be used to control various
  @@ -24,15 +24,15 @@
       shell.</p>
     <ul><li><a href="#setting">Setting Environment Variables</a><ul><li><a href="#basic-manipulation">Basic Environment Manipulation</a></li><li><a href="#conditional">Conditional Per-Request Settings</a></li><li><a href="#unique-identifiers">Unique Identifiers</a></li><li><a href="#standard-cgi">Standard CGI Variables</a></li><li><a href="#caveats">Some Caveats</a></li></ul></li><li><a href="#using">Using Environment Variables</a><ul><li><a href="#cgi-scripts">CGI Scripts</a></li><li><a href="#ssi-pages">SSI Pages</a></li><li><a href="#access-control">Access Control</a></li><li><a href="#logging">Conditional Logging</a></li><li><a href="#response-headers">Conditional Response Headers</a></li><li><a href="#external-filter">External Filter Activation</a></li><li><a href="#url-rewriting">URL Rewriting</a></li></ul></li><li><a href="#special">Special Purpose Environment Variables</a><ul><li><a href="#downgrade">downgrade-1.0</a></li><li><a href="#force-no-vary">force-no-vary</a></li><li><a href="#force-response">force-response-1.0</a></li><li><a href="#gzip-only-text/html">gzip-only-text/html</a></li><li><a href="#nokeepalive">nokeepalive</a></li><li><a href="#redirect-carefully">redirect-carefully</a></li><li><a href="#suppress-error-charset">suppress-error-charset</a></li></ul></li><li><a href="#examples">Examples</a><ul><li><a href="#misbehaving">Changing protocol behavior with misbehaving clients</a></li><li><a href="#no-img-log">Do not log requests for images in the access log</a></li><li><a href="#image-theft">Prevent "Image Theft"</a></li></ul></li></ul><hr><h2><a name="setting">Setting Environment Variables</a></h2>
       
  -    <table border="1"><tr><td valign="top"><strong>Related Modules</strong><br><br><code><a href="../mod/mod_env.html">mod_env</a></code><br><code><a href="../mod/mod_rewrite.html">mod_rewrite</a></code><br><code><a href="../mod/mod_setenvif.html">mod_setenvif</a></code><br><code><a href="../mod/mod_unique_id.html">mod_unique_id</a></code><br></td><td valign="top"><strong>Related Directives</strong><br><br><a href="../mod/mod_setenvif.html#browsermatch" class="directive"><code class="directive">BrowserMatch</code></a><br><a href="../mod/mod_setenvif.html#browsermatchnocase" class="directive"><code class="directive">BrowserMatchNoCase</code></a><br><a href="../mod/mod_env.html#passenv" class="directive"><code class="directive">PassEnv</code></a><br><a href="../mod/mod_rewrite.html#rewriterule" class="directive"><code class="directive">RewriteRule</code></a><br><a href="../mod/mod_env.html#setenv" class="directive"><code class="directive">SetEnv</code></a><br><a href="../mod/mod_setenvif.html#setenvif" class="directive"><code class="directive">SetEnvIf</code></a><br><a href="../mod/mod_setenvif.html#setenvifnocase" class="directive"><code class="directive">SetEnvIfNoCase</code></a><br><a href="../mod/mod_env.html#unsetenv" class="directive"><code class="directive">UnsetEnv</code></a><br></td></tr></table>
  +    <table border="1"><tr><td valign="top"><strong>Related Modules</strong><br><br><code><a href="./mod/mod_env.html">mod_env</a></code><br><code><a href="./mod/mod_rewrite.html">mod_rewrite</a></code><br><code><a href="./mod/mod_setenvif.html">mod_setenvif</a></code><br><code><a href="./mod/mod_unique_id.html">mod_unique_id</a></code><br></td><td valign="top"><strong>Related Directives</strong><br><br><a href="./mod/mod_setenvif.html#browsermatch" class="directive"><code class="directive">BrowserMatch</code></a><br><a href="./mod/mod_setenvif.html#browsermatchnocase" class="directive"><code class="directive">BrowserMatchNoCase</code></a><br><a href="./mod/mod_env.html#passenv" class="directive"><code class="directive">PassEnv</code></a><br><a href="./mod/mod_rewrite.html#rewriterule" class="directive"><code class="directive">RewriteRule</code></a><br><a href="./mod/mod_env.html#setenv" class="directive"><code class="directive">SetEnv</code></a><br><a href="./mod/mod_setenvif.html#setenvif" class="directive"><code class="directive">SetEnvIf</code></a><br><a href="./mod/mod_setenvif.html#setenvifnocase" class="directive"><code class="directive">SetEnvIfNoCase</code></a><br><a href="./mod/mod_env.html#unsetenv" class="directive"><code class="directive">UnsetEnv</code></a><br></td></tr></table>
       
       <h3><a name="basic-manipulation">Basic Environment Manipulation</a></h3>
           
       
           <p>The most basic way to set an environment variable in Apache
  -        is using the unconditional <a href="../mod/mod_env.html#setenv" class="directive"><code class="directive">SetEnv</code></a> directive. Variables may also be passed from
  +        is using the unconditional <a href="./mod/mod_env.html#setenv" class="directive"><code class="directive">SetEnv</code></a> directive. Variables may also be passed from
           the environment of the shell which started the server using the
  -        <a href="../mod/mod_env.html#passenv" class="directive"><code class="directive">PassEnv</code></a> directive.</p>
  +        <a href="./mod/mod_env.html#passenv" class="directive"><code class="directive">PassEnv</code></a> directive.</p>
       
       
       <h3><a name="conditional">Conditional Per-Request Settings</a></h3>
  @@ -44,7 +44,7 @@
           requests. For example, a variable could be set only when a
           specific browser (User-Agent) is making a request, or only when
           a specific Referer [sic] header is found. Even more flexibility
  -        is available through the mod_rewrite's <a href="../mod/mod_rewrite.html#rewriterule" class="directive"><code class="directive">RewriteRule</code></a> which uses the 
  +        is available through the mod_rewrite's <a href="./mod/mod_rewrite.html#rewriterule" class="directive"><code class="directive">RewriteRule</code></a> which uses the 
           <code>[E=...]</code> option to set environment variables.</p>
       
       
  @@ -92,7 +92,7 @@
     <h2><a name="using">Using Environment Variables</a></h2>
       
       
  -    <table border="1"><tr><td valign="top"><strong>Related Modules</strong><br><br><code><a href="../mod/mod_access.html">mod_access</a></code><br><code><a href="../mod/mod_cgi.html">mod_cgi</a></code><br><code><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code><br><code><a href="../mod/mod_headers.html">mod_headers</a></code><br><code><a href="../mod/mod_include.html">mod_include</a></code><br><code><a href="../mod/mod_log_config.html">mod_log_config</a></code><br><code><a href="../mod/mod_rewrite.html">mod_rewrite</a></code><br></td><td valign="top"><strong>Related Directives</strong><br><br><a href="../mod/mod_access.html#allow" class="directive"><code class="directive">Allow</code></a><br><a href="../mod/mod_log_config.html#customlog" class="directive"><code class="directive">CustomLog</code></a><br><a href="../mod/mod_access.html#deny" class="directive"><code class="directive">Deny</code></a><br><a href="../mod/mod_ext_filter.html#extfilterdefine" class="directive"><code class="directive">ExtFilterDefine</code></a><br><a href="../mod/mod_headers.html#header" class="directive"><code class="directive">Header</code></a><br><a href="../mod/mod_log_config.html#logformat" class="directive"><code class="directive">LogFormat</code></a><br><a href="../mod/mod_rewrite.html#rewritecond" class="directive"><code class="directive">RewriteCond</code></a><br><a href="../mod/mod_rewrite.html#rewriterule" class="directive"><code class="directive">RewriteRule</code></a><br></td></tr></table>
  +    <table border="1"><tr><td valign="top"><strong>Related Modules</strong><br><br><code><a href="./mod/mod_access.html">mod_access</a></code><br><code><a href="./mod/mod_cgi.html">mod_cgi</a></code><br><code><a href="./mod/mod_ext_filter.html">mod_ext_filter</a></code><br><code><a href="./mod/mod_headers.html">mod_headers</a></code><br><code><a href="./mod/mod_include.html">mod_include</a></code><br><code><a href="./mod/mod_log_config.html">mod_log_config</a></code><br><code><a href="./mod/mod_rewrite.html">mod_rewrite</a></code><br></td><td valign="top"><strong>Related Directives</strong><br><br><a href="./mod/mod_access.html#allow" class="directive"><code class="directive">Allow</code></a><br><a href="./mod/mod_log_config.html#customlog" class="directive"><code class="directive">CustomLog</code></a><br><a href="./mod/mod_access.html#deny" class="directive"><code class="directive">Deny</code></a><br><a href="./mod/mod_ext_filter.html#extfilterdefine" class="directive"><code class="directive">ExtFilterDefine</code></a><br><a href="./mod/mod_headers.html#header" class="directive"><code class="directive">Header</code></a><br><a href="./mod/mod_log_config.html#logformat" class="directive"><code class="directive">LogFormat</code></a><br><a href="./mod/mod_rewrite.html#rewritecond" class="directive"><code class="directive">RewriteCond</code></a><br><a href="./mod/mod_rewrite.html#rewriterule" class="directive"><code class="directive">RewriteRule</code></a><br></td></tr></table>
   
       <h3><a name="cgi-scripts">CGI Scripts</a></h3>
           
  @@ -123,7 +123,7 @@
           <p>Access to the server can be controlled based on the value of
           environment variables using the <code>allow from env=</code>
           and <code>deny from env=</code> directives. In combination with
  -        <a href="../mod/mod_setenvif.html#setenvif" class="directive"><code class="directive">SetEnvIf</code></a>, this 
  +        <a href="./mod/mod_setenvif.html#setenvif" class="directive"><code class="directive">SetEnvIf</code></a>, this 
           allows for flexible control of access to the server based on 
           characteristics of the client. For example, you can use these 
           directives to deny access to a particular browser (User-Agent).
  @@ -134,12 +134,12 @@
           
       
           <p>Environment variables can be logged in the access log using
  -        the <a href="../mod/mod_log_config.html#logformat" class="directive"><code class="directive">LogFormat</code></a>
  +        the <a href="./mod/mod_log_config.html#logformat" class="directive"><code class="directive">LogFormat</code></a>
           option <code>%e</code>. In addition, the decision on whether
           or not to log requests can be made based on the status of 
           environment variables using the conditional form of the 
  -        <a href="../mod/mod_log_config.html#customlog" class="directive"><code class="directive">CustomLog</code></a>
  -        directive. In combination with <a href="../mod/mod_setenvif.html#setenvif" class="directive"><code class="directive">SetEnvIf</code></a> this allows for flexible control of which 
  +        <a href="./mod/mod_log_config.html#customlog" class="directive"><code class="directive">CustomLog</code></a>
  +        directive. In combination with <a href="./mod/mod_setenvif.html#setenvif" class="directive"><code class="directive">SetEnvIf</code></a> this allows for flexible control of which 
           requests are logged. For example, you can choose not to log 
           requests for filenames ending in <code>gif</code>, or you can
           choose to only log requests from clients which are outside your
  @@ -149,7 +149,7 @@
       <h3><a name="response-headers">Conditional Response Headers</a></h3>
           
       
  -        <p>The <a href="../mod/mod_headers.html#header" class="directive"><code class="directive">Header</code></a>
  +        <p>The <a href="./mod/mod_headers.html#header" class="directive"><code class="directive">Header</code></a>
           directive can use the presence or
           absence of an environment variable to determine whether or not
           a certain HTTP header will be placed in the response to the
  @@ -162,8 +162,8 @@
       <h3><a name="external-filter">External Filter Activation</a></h3>
           
   
  -        <p>External filters configured by <code><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>
  -        using the <a href="../mod/mod_ext_filter.html#extfilterdefine" class="directive"><code class="directive">ExtFilterDefine</code></a> directive can
  +        <p>External filters configured by <code><a href="./mod/mod_ext_filter.html">mod_ext_filter</a></code>
  +        using the <a href="./mod/mod_ext_filter.html#extfilterdefine" class="directive"><code class="directive">ExtFilterDefine</code></a> directive can
           by activated conditional on an environment variable using the
           <code>disableenv=</code> and <code>enableenv=</code> options.</p>
       
  @@ -172,7 +172,7 @@
           
       
           <p>The <code>%{ENV:...}</code> form of <em>TestString</em> in
  -        the <a href="../mod/mod_rewrite.html#rewritecond" class="directive"><code class="directive">RewriteCond</code></a>
  +        the <a href="./mod/mod_rewrite.html#rewritecond" class="directive"><code class="directive">RewriteCond</code></a>
           allows mod_rewrite's rewrite
           engine to make decisions conditional on environment variables.
           Note that the variables accessible in mod_rewrite without the
  @@ -187,9 +187,9 @@
           mechanisms to modify the way Apache behaves when talking to
           particular clients. To make these mechanisms as flexible as
           possible, they are invoked by defining environment variables,
  -        typically with <a href="../mod/mod_setenvif.html#browsermatch" class="directive"><code class="directive">BrowserMatch</code></a>,
  -        though <a href="../mod/mod_env.html#setenv" class="directive"><code class="directive">SetEnv</code></a> and 
  -        <a href="../mod/mod_env.html#passenv" class="directive"><code class="directive">PassEnv</code></a> could also be used,
  +        typically with <a href="./mod/mod_setenvif.html#browsermatch" class="directive"><code class="directive">BrowserMatch</code></a>,
  +        though <a href="./mod/mod_env.html#setenv" class="directive"><code class="directive">SetEnv</code></a> and 
  +        <a href="./mod/mod_env.html#passenv" class="directive"><code class="directive">PassEnv</code></a> could also be used,
           for example.</p>
       
       <h3><a name="downgrade">downgrade-1.0</a></h3>
  @@ -223,14 +223,14 @@
           
   
           <p>When set to a value of "1", this variable disables the DEFLATE
  -        output filter provided by <code><a href="../mod/mod_deflate.html">mod_deflate</a></code> for
  +        output filter provided by <code><a href="./mod/mod_deflate.html">mod_deflate</a></code> for
           content-types other than <code>text/html</code>.</p>
       
   
       <h3><a name="nokeepalive">nokeepalive</a></h3>
           
       
  -        <p>This disables <a href="../mod/core.html#keepalive" class="directive"><code class="directive">KeepAlive</code></a> when set.</p>
  +        <p>This disables <a href="./mod/core.html#keepalive" class="directive"><code class="directive">KeepAlive</code></a> when set.</p>
       
       
       <h3><a name="redirect-carefully">redirect-carefully</a></h3>
  @@ -331,4 +331,4 @@
           ApacheToday tutorial " <a href="http://apachetoday.com/news_story.php3?ltsn=2000-06-14-002-01-PS">
       Keeping Your Images from Adorning Other Sites</a>".</p>
       
  -  <hr></blockquote><h3 align="center">Apache HTTP Server Version 2.0</h3><a href="./"><img src="../images/index.gif" alt="Index"></a><a href="../"><img src="../images/home.gif" alt="Home"></a></body></html>
  \ No newline at end of file
  +  <hr></blockquote><h3 align="center">Apache HTTP Server Version 2.0</h3><a href="./"><img src="./images/index.gif" alt="Index"></a><a href="./"><img src="./images/home.gif" alt="Home"></a></body></html>
  \ No newline at end of file
  
  
  

Re: [!FIX!] docs build system broken

Posted by Joshua Slive <jo...@slive.ca>.
Erik Abele wrote:

> Attached a patch to the current CVS HEAD. I tested this thoroughly and it
> works very fine for me.

Works for me.  Committed.

Thanks for fixing this!

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: [!FIX!] docs build system broken

Posted by David Shane Holden <dp...@yahoo.com>.
Works for me.

I was trying a different approach by declaring the path variable within each
of the pages that used it (manualpage, modulesynopsis, etc.), then passing
it to the child templates as params.  That way there wouldn't be a need for
the global variable.

I think your fix is better though.

Shane



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


[!FIX!] docs build system broken

Posted by Erik Abele <er...@codefaktor.de>.
on 23.08.2002 19:19 Uhr Joshua Slive (joshua@slive.ca) wrote:

> Cliff Woolley wrote:
>> On Wed, 21 Aug 2002, Joshua Slive wrote:
>>> Any ideas?  Can anyone else recreate this?
>> 
>> Yes, I see this exact kind of thing all the time.  Very annoying.  I
>> hadn't put much thought into it though.  Perhaps it has to do with whether
>> you run ./build.sh or ../build.sh?
> 
> The nearest I can figure out, the variable definition for relativepath
> gets set correctly for the first doc that is transformed, and then all
> future docs gets the same relativepath.  I don't think this is a bug in
> the stylesheet.  A "variable" in xslt is really a constant, in the sense
> that it can't be changed; but this should only apply per-file, right?

There is no bug in the stylesheet, but since Ant only loads the stylesheet
one time per <style>-section, the stylesheet doesn't get updated for every
single file. Therefore the relativepath-var in the xsl keeps its value from
the first xml-document. Although this results in faster transforming, it
introduces the described problems when it comes to different path-depths.
 
> In any case, I'll give this issue another 24 hours to mull around in
> peoples brains, and if nobody comes up with a solution I will revert the
> build.xml how it was a few versions ago: transform each directory
> seperately.

A possible solution would be some additional <style>-sections in which the
path-depth for transforming the docs is restricted to only one depth. Since
we don't have a very complex directory-tree this should be a lot easier to
maintain as the last version of build.xml, where we had to change a lot, to
insert new languages or new directories. Another positive side-effect is the
fact that this should be much faster than loading the stylesheet for every
directory (e.g. ./, ./misc, ./howto, ./developers, ./ssl, ./vhost, ... in
contrast to ./, ./**, ...).

Puuh, I hope this is somewhat understandable...I surely have to improve my
english-skills :-)) If there are any questions, please ask.

Attached a patch to the current CVS HEAD. I tested this thoroughly and it
works very fine for me.

Another thing to mention: while playing with the build-system I spotted a
param named 'relative-path' in every <style>-section. I couldn't find any
reference to it in the stylesheet, so I think this is an oddment of an older
version. I removed it in the attached patch.

BTW: sorry for the late reply on this, but I wasn't at home for the last two
days...*sigh*...

Erik


docs build system broken

Posted by Joshua Slive <jo...@slive.ca>.
Cliff Woolley wrote:
> On Wed, 21 Aug 2002, Joshua Slive wrote:
> 
> 
>>Any ideas?  Can anyone else recreate this?
> 
> 
> Yes, I see this exact kind of thing all the time.  Very annoying.  I
> hadn't put much thought into it though.  Perhaps it has to do with whether
> you run ./build.sh or ../build.sh?

The nearest I can figure out, the variable definition for relativepath 
gets set correctly for the first doc that is transformed, and then all 
future docs gets the same relativepath.  I don't think this is a bug in 
the stylesheet.  A "variable" in xslt is really a constant, in the sense 
that it can't be changed; but this should only apply per-file, right?

In any case, I'll give this issue another 24 hours to mull around in 
peoples brains, and if nobody comes up with a solution I will revert the 
build.xml how it was a few versions ago: transform each directory 
seperately.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: cvs commit: httpd-2.0/docs/manual env.html.en

Posted by Cliff Woolley <jw...@virginia.edu>.
On Wed, 21 Aug 2002, Joshua Slive wrote:

> Any ideas?  Can anyone else recreate this?

Yes, I see this exact kind of thing all the time.  Very annoying.  I
hadn't put much thought into it though.  Perhaps it has to do with whether
you run ./build.sh or ../build.sh?

--Cliff


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: cvs commit: httpd-2.0/docs/manual env.html.en

Posted by Joshua Slive <jo...@slive.ca>.
On 22 Aug 2002 slive@apache.org wrote:

> slive       2002/08/21 19:57:07
>
>   Modified:    docs/manual env.html.en
>   Log:
>   Darn.  There appears to be something wrong with the xml->html system.
>   Rebuilding to get correct paths.
>

>   -        <a href="../mod/mod_env.html#passenv" class="directive"><code class="directive">PassEnv</code></a> directive.</p>
>   +        <a href="./mod/mod_env.html#passenv" class="directive"><code class="directive">PassEnv</code></a> directive.</p>

Notice the diff here folks.

Also note that I changed NOTHING between the first build and the second
build of env.html.en.  I just did "touch env.xml;cd build;build.sh".
The only difference is that for the first build several other files
were also transformed at the same time, while in the second (correct)
build, only the env.xml file was transformed.

Punchline: the build process is broken.  This is exactly the problem
that I reported before when I tried to combine the builds from all
the directories into one shot.

Any ideas?  Can anyone else recreate this?  (Try randomly touching
a few files in different directories and then build.  If things are
working, you should then have no output to "cvs diff".)

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org