mod_actions.html revision 1b55e9e0a3c5fb40d9e46d3e6f711516a9a807fa
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering<html xmlns="http://www.w3.org/TR/xhtml1/strict"><head><!--
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering This file is generated from xml source: DO NOT EDIT
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart PoetteringXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering--><title>mod_actions - Apache HTTP Server</title><link href="/style/manual.css" type="text/css" rel="stylesheet"/></head><body><blockquote><div align="center"><img alt="[APACHE DOCUMENTATION]" src="/images/sub.gif"/><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module mod_actions</h1><table cellspacing="1" cellpadding="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td valign="top"><span class="help">Description:</span></td><td><description>This module provides for executing CGI scripts based on
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringmedia type or request method.</description></td></tr><tr><td><a href="module-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="module-dict.html#ModuleIdentifier" class="help">Module Identifier:</a></td><td>actions_module</td></tr></table></td></tr></table><h2>Summary</h2><summary>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <p>This module has two directives. The <a href="#action" class="directive"><code class="directive">Action</code></a> directive lets you run CGI
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering scripts whenever a file of a certain type is requested. The
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <a href="#script" class="directive"><code class="directive">Script</code></a> directive lets
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering you run CGI scripts whenever a particular method is used in a
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering request. This makes it much easier to execute scripts that process
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering</summary><h2>Directives</h2><ul><li><a href="#action">Action</a></li><li><a href="#script">Script</a></li></ul><hr/><h2><a name="Action">Action</a> <a name="action">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Activates a CGI script for a particular handler or
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringcontent-type</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td><syntax>Action <em>action-type cgi-script</em></syntax></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>FileInfo</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_actions</td></tr></table></td></tr></table><usage>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <p>This directive adds an action, which will activate
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <em>cgi-script</em> when <em>action-type</em> is triggered by
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering the request. The <em>action-type</em> can be either a <a href="/handler.html">handler</a> or a MIME content type. It
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering sends the URL and file path of the requested document using the
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering standard CGI PATH_INFO and PATH_TRANSLATED environment
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering variables.</p>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Examples</strong></p><code>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering # Requests for files of a particular type:<br>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering # Files of a particular file extension<br>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering AddHandler my-file-type .xyz<br>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering Action my-file-type /cgi-bin/program.cgi<br>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <p>In the first example, requests for files with a MIME content
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering type of <code>image/gif</code> will instead be handled by the
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering specified cgi script <code>/cgi-bin/images.cgi</code>.</p>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <p>In the second example, requests for files with a file extension of
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <code>.xyz</code> are handled instead by the specified cgi script
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering</usage><p><strong>See also </strong></p><ul><li><a href="mod_mime.html#addhandler" class="directive"><code class="directive">AddHandler</code></a></li></ul><hr/><h2><a name="Script">Script</a> <a name="script">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Activates a CGI script for a particular request
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poetteringmethod.</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td><syntax> Script <em>method cgi-script</em></syntax></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_actions</td></tr></table></td></tr></table><usage>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <p>This directive adds an action, which will activate
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <em>cgi-script</em> when a file is requested using the method of
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <em>method</em>. It sends the URL and file path of the requested
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering document using the standard CGI PATH_INFO and PATH_TRANSLATED
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering environment variables.</p>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering<blockquote><table><tr><td bgcolor="#e0e5f5">
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering Any arbitrary method name may be used. <strong>Method names are
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering case-sensitive</strong>, so <code>Script PUT</code> and
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <code>Script put</code> have two entirely different
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering <p>Note that the Script command defines default actions only.
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering If a CGI script is called, or some other resource that is
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering capable of handling the requested method internally, it will do
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering so. Also note that Script with a method of <code>GET</code>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering will only be called if there are query arguments present
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering (<em>e.g.</em>, foo.html?hi). Otherwise, the request will
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering proceed normally.</p>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Examples</strong></p><code>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering # For <ISINDEX>-style searching<br>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering # A CGI PUT handler<br>
cabb0bc6b1a4ec57e108dc99364687d7c4f9670fLennart Poettering</usage><hr/><h3 align="center">Apache HTTP Server Version 2.0</h3><a href="./"><img alt="Index" src="/images/index.gif"/></a><a href="../"><img alt="Home" src="/images/home.gif"/></a></blockquote></body></html>