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...@locus.apache.org on 2000/10/23 23:57:59 UTC
cvs commit: httpd-docs-1.3/htdocs/manual handler.html env.html configuring.html
slive 00/10/23 14:57:59
Modified: htdocs/manual handler.html env.html configuring.html
Log:
Update in formats (change <ul> to <table>) and some small revisions
to handler.html.
Revision Changes Path
1.19 +82 -119 httpd-docs-1.3/htdocs/manual/handler.html
Index: handler.html
===================================================================
RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/handler.html,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- handler.html 1999/02/11 20:22:59 1.18
+++ handler.html 2000/10/23 21:57:58 1.19
@@ -15,26 +15,58 @@
<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Apache's Handler Use</H1>
-<H2>What is a Handler</H2>
+<ul>
+<li><a href="#definition">What is a Handler</a></li>
+<li><a href="#examples">Examples</a></li>
+<li><a href="#programmer">Programmer's Note</a></li>
+</ul>
+
+<hr>
+<H2><a name="definition">What is a Handler</a></H2>
+
+<table border="1">
+<tr><td valign="top">
+<strong>Related Modules</strong><br><br>
+
+<a href="mod/mod_actions.html">mod_actions</a><br>
+<A HREF="mod/mod_asis.html">mod_asis</A><br>
+<A HREF="mod/mod_cgi.html">mod_cgi</A><br>
+<A HREF="mod/mod_imap.html">mod_imap</A><br>
+<A HREF="mod/mod_info.html">mod_info</A><br>
+<A HREF="mod/mod_include.html">mod_include</A><br>
+<a href="mod/mod_mime.html">mod_mime</a><br>
+<A HREF="mod/mod_negotiation.html">mod_negotiation</A><br>
+<A HREF="mod/mod_status.html">mod_status</A><br>
+</td>
+<td valign="top">
+<strong>Related Directives</strong><br><br>
+
+<a href="mod/mod_actions.html#action">Action</a><br>
+<A HREF="mod/mod_mime.html#addhandler">AddHandler</A><br>
+<a href="mod/mod_mime.html#removehandler">RemoveHandler</a><br>
+<A HREF="mod/mod_mime.html#sethandler">SetHandler</A><br>
+</td>
+</tr></table>
+
<P>A "handler" is an internal Apache representation of the action to be
performed when a file is called. Generally, files have implicit
handlers, based on the file type. Normally, all files are simply
-served by the server, but certain file typed are "handled"
-separately. For example, you may use a type of
-"application/x-httpd-cgi" to invoke CGI scripts.</P>
-
-<P>Apache 1.1 adds the additional ability to use handlers
-explicitly. Either based on filename extensions or on location, these
-handlers are unrelated to file type. This is advantageous both because
-it is a more elegant solution, but it also allows for both a type
-<STRONG>and</STRONG> a handler to be associated with a file (See also
-<A HREF="mod/mod_mime.html#multipleext">Files with Multiple Extensions</A>)
+served by the server, but certain file types are "handled"
+separately.</P>
+
+<P>Apache 1.1 adds the ability to use handlers explicitly. Based on
+either filename extensions or on location, handlers can be specified
+without relation to file type. This is advantageous both because it is
+a more elegant solution, and because it also allows for both a type
+<STRONG>and</STRONG> a handler to be associated with a file. (See also
+<A HREF="mod/mod_mime.html#multipleext">Files with Multiple
+Extensions</A>.)</p>
</P>
-<P>Handlers can either be built into the server or to a module, or
-they can be added with the <A
+<P>Handlers can either be built into the server, included in a module,
+or they can be added with the <A
HREF="mod/mod_actions.html#action">Action</A> directive. The built-in
handlers in the standard distribution are as follows:</P>
@@ -50,128 +82,59 @@
Treat the file as a CGI script.
(<A HREF="mod/mod_cgi.html">mod_cgi</A>)
<LI><STRONG>imap-file</STRONG>:
- Imagemap rule file.
+ Parse as an imagemap rule file.
(<A HREF="mod/mod_imap.html">mod_imap</A>)
<LI><STRONG>server-info</STRONG>:
- Get the server's configuration information
+ Get the server's configuration information.
(<A HREF="mod/mod_info.html">mod_info</A>)
<LI><STRONG>server-parsed</STRONG>:
- Parse for server-side includes
+ Parse for server-side includes.
(<A HREF="mod/mod_include.html">mod_include</A>)
<LI><STRONG>server-status</STRONG>:
- Get the server's status report
+ Get the server's status report.
(<A HREF="mod/mod_status.html">mod_status</A>)
<LI><STRONG>type-map</STRONG>:
- Parse as a type map file for content negotiation
+ Parse as a type map file for content negotiation.
(<A HREF="mod/mod_negotiation.html">mod_negotiation</A>)
</UL>
-<P>
+<hr>
-<H2>Directives</H2>
-<UL>
-<LI><A HREF="#addhandler">AddHandler</A>
-<LI><A HREF="#sethandler">SetHandler</A>
-</UL>
+<h2><a name="examples">Examples</a></h2>
+
+<h3>Modifying static content using a CGI script</h3>
+
+<p>The following directives will cause requests for files with the
+<code>html</code> extension to trigger the launch of the
+<code>footer.pl</code> CGI script.</p>
+
+<pre>
+ Action add-footer /cgi-bin/footer.pl
+ AddHandler add-footer html
+</pre>
+
+<p>Then the CGI script is responsible for sending the originally
+requested document (pointed to by the <code>PATH_TRANSLATED</code>
+environment variable) and making whatever modifications or additions
+are desired.</p>
+
+<h3>Files with HTTP headers</h3>
-<HR>
+<p>The following directives will enable the <code>send-as-is</code>
+handler, which is used for files which contain their own HTTP headers.
+All files in the <code>/web/htdocs/asis/</code> directory will be
+processed by the <code>send-as-is</code> handler, regardless of their
+filename extensions.</p>
-<H2><A NAME="addhandler">AddHandler</A></H2>
+<pre>
+ <Directory /web/htdocs/asis>
+ SetHandler send-as-is
+ </Directory>
+</pre>
-<A
- HREF="mod/directive-dict.html#Syntax"
- REL="Help"
-><STRONG>Syntax:</STRONG></A> AddHandler <EM>handler-name extension extension...</EM><BR>
-<A
- HREF="mod/directive-dict.html#Context"
- REL="Help"
-><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR>
-<A
- HREF="mod/directive-dict.html#Override"
- REL="Help"
-><STRONG>Override:</STRONG></A> FileInfo<BR>
-<A
- HREF="mod/directive-dict.html#Status"
- REL="Help"
-><STRONG>Status:</STRONG></A> Base<BR>
-<A
- HREF="mod/directive-dict.html#Module"
- REL="Help"
-><STRONG>Module:</STRONG></A> mod_mime<BR>
-<A
- HREF="mod/directive-dict.html#Compatibility"
- REL="Help"
-><STRONG>Compatibility:</STRONG></A> AddHandler is only available in Apache
-1.1 and later<P>
-
-<P>AddHandler maps the filename extensions <EM>extension</EM> to the
-handler <EM>handler-name</EM>. This mapping is added to any already
-in force, overriding any mappings that already exist for the same
-<EM>extension</EM>.
-
-For example, to activate CGI scripts
-with the file extension "<CODE>.cgi</CODE>", you might use:
-<PRE>
- AddHandler cgi-script cgi
-</PRE>
-
-<P>Once that has been put into your srm.conf or httpd.conf file, any
-file containing the "<CODE>.cgi</CODE>" extension will be treated as a
-CGI program.</P>
-
-<P>
-
-<STRONG>See also</STRONG>: <A HREF="mod/mod_mime.html#multipleext">Files with
-multiple extensions</A>
-
-<HR>
-
-<H2><A NAME="sethandler">SetHandler</A></H2>
-
-<A
- HREF="mod/directive-dict.html#Syntax"
- REL="Help"
-><STRONG>Syntax:</STRONG></A> SetHandler <EM>handler-name</EM><BR>
-<A
- HREF="mod/directive-dict.html#Context"
- REL="Help"
-><STRONG>Context:</STRONG></A> directory, .htaccess<BR>
-<A
- HREF="mod/directive-dict.html#Status"
- REL="Help"
-><STRONG>Status:</STRONG></A> Base<BR>
-<A
- HREF="mod/directive-dict.html#Module"
- REL="Help"
-><STRONG>Module:</STRONG></A> mod_mime<BR>
-<A
- HREF="mod/directive-dict.html#Compatibility"
- REL="Help"
-><STRONG>Compatibility:</STRONG></A> SetHandler is only available in Apache
-1.1 and later.<P>
-
-<P>When placed into an <CODE>.htaccess</CODE> file or a
-<CODE><Directory></CODE> or <CODE><Location></CODE>
-section, this directive forces all matching files to be parsed through
-the handler given by <EM>handler-name</EM>. For example, if you had a
-directory you wanted to be parsed entirely as imagemap rule files,
-regardless of extension, you might put the following into an
-<CODE>.htaccess</CODE> file in that directory:
-<PRE>
- SetHandler imap-file
-</PRE>
-
-<P>Another example: if you wanted to have the server display a status
-report whenever a URL of <CODE>http://servername/status</CODE> was
-called, you might put the following into access.conf:
-<PRE>
- <Location /status>
- SetHandler server-status
- </Location>
-</PRE>
-<HR>
+<hr>
-<H2>Programmer's Note</H2>
+<H2><a name="programmer">Programmer's Note</a></H2>
<P>In order to implement the handler features, an addition has been
made to the <A HREF="misc/API.html">Apache API</A> that you may wish to
1.12 +49 -46 httpd-docs-1.3/htdocs/manual/env.html
Index: env.html
===================================================================
RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/env.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- env.html 2000/10/14 02:44:43 1.11
+++ env.html 2000/10/23 21:57:58 1.12
@@ -22,38 +22,38 @@
explains some of the ways to use environment variables in Apache.</p>
<ul>
-<li><a href="#setting">Setting Environment Variables</a></li>
-<li><a href="#using">Using Environment Variables</a></li>
-<li><a href="#special">Special Purpose Environment Variables</a></li>
-<li><a href="#examples">Examples</a></li>
+<li><a href="#setting">Setting Environment Variables</a><br>
+<li><a href="#using">Using Environment Variables</a><br>
+<li><a href="#special">Special Purpose Environment Variables</a><br>
+<li><a href="#examples">Examples</a><br>
</ul>
<hr>
<h2><a name="setting">Setting Environment Variables</a></h2>
-<h3>Related Modules</h3>
+<table border="1">
+<tr><td valign="top">
+<strong>Related Modules</strong><br><br>
+
+<a href="mod/mod_env.html">mod_env</a><br>
+<a href="mod/mod_rewrite.html">mod_rewrite</a><br>
+<a href="mod/mod_setenvif.html">mod_setenvif</a><br>
+<a href="mod/mod_unique_id.html">mod_unique_id</a><br>
+
+</td><td valign="top">
+<strong>Related Directives</strong><br><br>
+
+<A HREF="mod/mod_setenvif.html#BrowserMatch">BrowserMatch</A><br>
+<A HREF="mod/mod_setenvif.html#BrowserMatchNoCase">BrowserMatchNoCase</A><br>
+<A HREF="mod/mod_env.html#passenv">PassEnv</A><br>
+<A HREF="mod/mod_rewrite.html#RewriteRule">RewriteRule</A><br>
+<A HREF="mod/mod_env.html#setenv">SetEnv</A><br>
+<A HREF="mod/mod_setenvif.html#SetEnvIf">SetEnvIf</A><br>
+<A HREF="mod/mod_setenvif.html#SetEnvIfNoCase">SetEnvIfNoCase</A><br>
+<A HREF="mod/mod_env.html#unsetenv">UnsetEnv</A><br>
+</td></tr></table>
-<ul>
-<li><a href="mod/mod_env.html">mod_env</a></li>
-<li><a href="mod/mod_rewrite.html">mod_rewrite</a></li>
-<li><a href="mod/mod_setenvif.html">mod_setenvif</a></li>
-<li><a href="mod/mod_unique_id.html">mod_unique_id</a></li>
-</ul>
-
-<h3>Related Directives</h3>
-
-<ul>
-<li><A HREF="mod/mod_setenvif.html#BrowserMatch">BrowserMatch</A></li>
-<li><A HREF="mod/mod_setenvif.html#BrowserMatchNoCase">BrowserMatchNoCase</A></li>
-<li><A HREF="mod/mod_env.html#passenv">PassEnv</A></li>
-<li><A HREF="mod/mod_rewrite.html#RewriteRule">RewriteRule</A></li>
-<li><A HREF="mod/mod_env.html#setenv">SetEnv</A></li>
-<li><A HREF="mod/mod_setenvif.html#SetEnvIf">SetEnvIf</A></li>
-<li><A HREF="mod/mod_setenvif.html#SetEnvIfNoCase">SetEnvIfNoCase</A></li>
-<li><A HREF="mod/mod_env.html#unsetenv">UnsetEnv</A></li>
-</ul>
-
<p>The most basic way to set an environment variable in Apache is
using the unconditional <code>SetEnv</code> directive. Variables
may also be passed from the environment when Apache is started
@@ -75,28 +75,27 @@
<h2><a name="using">Using Environment Variables</a></h2>
-<h3>Related Modules</h3>
+<table border=1><tr><td valign="top">
+<strong>Related Modules</strong><br><br>
-<ul>
-<li><a href="mod/mod_access.html">mod_access</a></li>
-<li><a href="mod/mod_cgi.html">mod_cgi</a></li>
-<li><a href="mod/mod_include.html">mod_include</a></li>
-<li><a href="mod/mod_log_config.html">mod_log_config</a></li>
-<li><a href="mod/mod_rewrite.html">mod_rewrite</a></li>
-</ul>
-
-<h3>Related Directives</h3>
-
-<ul>
-<LI><A HREF="mod/mod_access.html#allowfromenv">Allow from env=</A></li>
-<li><a href="mod/mod_log_config.html#customlog-conditional">CustomLog
-(conditional)</a></li>
-<LI><A HREF="mod/mod_access.html#denyfromenv">Deny from env=</A></li>
-<li><a href="mod/mod_log_config.html#logformat">LogFormat</a></li>
-<LI><A HREF="mod/mod_rewrite.html#RewriteCond">RewriteCond</A></li>
-<LI><A HREF="mod/mod_rewrite.html#RewriteRule">RewriteRule</A></li>
-</ul>
+<a href="mod/mod_access.html">mod_access</a><br>
+<a href="mod/mod_cgi.html">mod_cgi</a><br>
+<a href="mod/mod_include.html">mod_include</a><br>
+<a href="mod/mod_log_config.html">mod_log_config</a><br>
+<a href="mod/mod_rewrite.html">mod_rewrite</a><br>
+
+</td><td valign="top">
+<strong>Related Directives</strong><br><br>
+
+<A HREF="mod/mod_access.html#allowfromenv">Allow from env=</A><br>
+<a href="mod/mod_log_config.html#customlog-conditional">CustomLog
+(conditional)</a><br>
+<A HREF="mod/mod_access.html#denyfromenv">Deny from env=</A><br>
+<a href="mod/mod_log_config.html#logformat">LogFormat</a><br>
+<A HREF="mod/mod_rewrite.html#RewriteCond">RewriteCond</A><br>
+<A HREF="mod/mod_rewrite.html#RewriteRule">RewriteRule</A><br>
+</td></tr></table>
<p>One of the primary uses of environment variables is to communicate
information to CGI scripts. In addition to all environment variables
@@ -138,7 +137,11 @@
<p>The <code>%{ENV:...}</code> form of <em>TestString</em> in the
<code>RewriteCond</code> allows mod_rewrite's rewrite engine to make
-decisions conditional on environment variables.
+decisions conditional on environment variables. Note that the
+variables accessible in mod_rewrite without the <code>ENV:</code>
+prefix are not actually environment variables. Rather, they
+are variables special to mod_rewrite which cannot be accessed from
+other modules.</p>
<hr>
1.5 +77 -9 httpd-docs-1.3/htdocs/manual/configuring.html
Index: configuring.html
===================================================================
RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/configuring.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- configuring.html 2000/10/04 15:39:22 1.4
+++ configuring.html 2000/10/23 21:57:58 1.5
@@ -15,7 +15,32 @@
<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Configuring Apache</H1>
-<H2>Main Configuration Files</H2>
+<ul>
+<li><a href="#main">Main Configuration Files</a></li>
+<li><a href="#syntax">Syntax of the Configuration Files</a></li>
+<li><a href="#modules">Modules</a></li>
+<li><a href="#scope">Scope of Directives</a></li>
+<li><a href="#htaccess">.htaccess Files</a></li>
+<li><a href="#log">Log Files</a></li>
+</ul>
+
+<hr>
+
+<H2><a name="main">Main Configuration Files</a></H2>
+
+<table border="1"><tr><td valign="top">
+<strong>Related Modules</strong><br><br>
+<a href="mod/mod_mime.html">mod_mime</a><br>
+</td>
+
+<td valign="top">
+<strong>Related Directives</strong><br><br>
+<A HREF="mod/core.html#accessconfig">AccessConfig</A><br>
+<A HREF="mod/core.html#ifdefine"><IfDefine></A><br>
+<a href="mod/core.html#include">Include</a><br>
+<A HREF="mod/core.html#resourceconfig">ResourceConfig</A><br>
+<A HREF="mod/mod_mime.html#typesconfig">TypesConfig</A><br>
+</td></tr></table>
<P>Apache is configured by placing <A HREF="mod/directives.html"
>directives</A> in plain text configuration files. The main
@@ -28,7 +53,7 @@
the <CODE><A HREF="mod/core.html#include">Include</A></CODE>
directive. Any directive may be placed in any of these configuration
files. Changes to the main configuration files are only recognized by
-Apache when it is started or restarted.
+Apache when it is started or restarted.</p>
<P>New with Apache 1.3.13 is a feature where if any configuration
file is actually a directory, Apache will enter that directory
@@ -45,8 +70,10 @@
filename is set by the <A HREF="mod/mod_mime.html#typesconfig"
>TypesConfig</A> directive, and is <CODE>mime.types</CODE> by default.
-<H2>Syntax of the Configuration Files</H2>
+<hr>
+<H2><a name="syntax">Syntax of the Configuration Files</a></H2>
+
<P>Apache configuration files contain one directive per line. The
back-slash "\" may be used as the last character on a line to indicate
that the directive continues onto the next line. There must be no
@@ -64,25 +91,55 @@
<P>You can check your configuration files for syntax errors without
starting the server by using <CODE>apachectl configtest</CODE>
or the <CODE>-t</CODE> command line option.
+
+<hr>
-<H2>Modules</H2>
+<H2><a name="modules">Modules</a></H2>
+<table border="1"><tr><td valign="top">
+<strong>Related Modules</strong><br><br>
+<a href="mod/mod_so.html">mod_so</a><br>
+</td>
+<td valign="top">
+<strong>Related Directives</strong><br><br>
+<A HREF="mod/core.html#addmodule">AddModule</A><br>
+<A HREF="mod/core.html#clearmodulelist">ClearModuleList</A><br>
+<A HREF="mod/core.html#ifmodule"><IfModule></A><br>
+<a href="mod/mod_so.html">LoadModule</a><br>
+</td></tr></table>
+
<P>Apache is a modular server. This implies that only the most basic
functionality is included in the core server. Extended features are
-available through <A HREF="mod/index-bytype.html">modules</A> which can
-be loaded into Apache. By default, a <A
+available through <A HREF="mod/index-bytype.html">modules</A> which
+can be loaded into Apache. By default, a <A
HREF="mod/directive-dict.html#Status">base</A> set of modules is
included in the server at compile-time. If the server is compiled to
use <A HREF="dso.html">dynamically loaded</A> modules, then modules
can be compiled separately and added at any time using the <A
HREF="mod/mod_so.html#loadmodule">LoadModule</A> directive.
Otherwise, Apache must be recompiled to add or remove modules.
+Configuration directives may be included conditional on a presence of
+a particular module by enclosing them in an <A
+HREF="mod/core.html#ifmodule"><IfModule></A> block.
<P>To see which modules are currently compiled into the server,
you can use the <CODE>-l</CODE> command line option.
+
+<hr>
-<H2>Scope of Directives</H2>
+<H2><a name="scope">Scope of Directives</a></H2>
+<table border="1"><tr><td valign="top">
+<strong>Related Directives</strong><br><br>
+<A HREF="mod/core.html#directory"><Directory></A><br>
+<A HREF="mod/core.html#directorymatch"><DirectoryMatch></A><br>
+<A HREF="mod/core.html#files"><Files></A><br>
+<A HREF="mod/core.html#filesmatch"><FilesMatch></A><br>
+<A HREF="mod/core.html#location"><Location></A><br>
+<A HREF="mod/core.html#locationmatch"><LocationMatch></A><br>
+<a href="mod/core.html#virtualhost"><VirtualHost></a><br>
+</td></tr></table>
+
<P>Directives placed in the main configuration files apply to the entire
server. If you wish to change the configuration for only a part of
the server, you can scope your directives by placing them in
@@ -114,9 +171,17 @@
For further information, we provide details on <A
HREF="sections.html">How Directory, Location and Files sections
work</A>.
+
+<hr>
-<H2>.htaccess Files</H2>
+<H2><a name="htaccess">.htaccess Files</a></H2>
+<table border="1"><tr><td valign="top">
+<strong>Related Directives</strong><br><br>
+<A HREF="mod/core.html#accessfilename">AccessFileName</A><br>
+<A HREF="mod/core.html#allowoverride">AllowOverride</A><br>
+</td></tr></table>
+
<P>Apache allows for decentralized management of configuration via
special files placed inside the web tree. The special files are
usually called <CODE>.htaccess</CODE>, but any name can be specified
@@ -136,8 +201,11 @@
configuring the <A
HREF="mod/core.html#allowoverride"><CODE>AllowOverride</CODE></A>
directive in the main configuration files.
+
+<hr>
-<H2>Log files</H2>
+<H2><a name="logs">Log files</a></H2>
+<!-- This section should be moved to its own file -->
<H3>security warning</H3>
Anyone who can write to the directory where Apache is writing a
log file can almost certainly gain access to the uid that the server is