97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive This file is generated from xml source: DO NOT EDIT
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc<title>mod_actions - Apache HTTP Server Version 2.5</title>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<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" />
2e545ce2450a9953665f701bb05350f0d3f26275nd<script src="/style/scripts/prettify.min.js" type="text/javascript">
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.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>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.5</a> > <a href="./">Modules</a></div>
8529679ec1c2e3285d9a2b0e124d3af16154c406kess<p><span>Available Languages: </span><a href="/de/mod/mod_actions.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
8529679ec1c2e3285d9a2b0e124d3af16154c406kess<a href="/en/mod/mod_actions.html" title="English"> en </a> |
cc8190433d13f5e9de618c5d7f10c824c0c1919cgryzor<a href="/fr/mod/mod_actions.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd<a href="/ja/mod/mod_actions.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/ko/mod/mod_actions.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
864d6d55a72bdb982ebabbc95cf8f051c43fa6ddrbowen<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Execute CGI scripts based on media type or request method.</td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>actions_module</td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_actions.c</td></tr></table>
97a9a944b5887e91042b019776c41d5dd74557aferikabele <p>This module has two directives. The <code class="directive"><a href="#action">Action</a></code> directive lets you run CGI
20189240503ef2c8f5dc6e2248b57faab4b23b5and scripts whenever a file of a certain <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME content type</a> is requested. The
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="#script">Script</a></code> directive lets
06ba4a61654b3763ad65f52283832ebf058fdf1cslive you run CGI scripts whenever a particular method is used in a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive request. This makes it much easier to execute scripts that process
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<div id="quickview"><h3 class="directives">Directives</h3>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<li><img alt="" src="/images/down.gif" /> <a href="#action">Action</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#script">Script</a></li>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<li><code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code></li>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<li><a href="/howto/cgi.html">Dynamic Content with CGI</a></li>
aa0c9ba3adef6e0e98c6f38d2bf690283b609aacrbowen<li><a href="/handler.html">Apache httpd's Handler Use</a></li>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<div class="directive-section"><h2><a name="Action" id="Action">Action</a> <a name="action" id="action">Directive</a></h2>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Activates a CGI script for a particular handler or
62160b002faf84ed5427a5b4ad264031eba3f908nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Action <var>action-type</var> <var>cgi-script</var> [virtual]</code></td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_actions</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive adds an action, which will activate
20189240503ef2c8f5dc6e2248b57faab4b23b5and <var>cgi-script</var> when <var>action-type</var> is triggered by
20189240503ef2c8f5dc6e2248b57faab4b23b5and the request. The <var>cgi-script</var> is the URL-path to a
20189240503ef2c8f5dc6e2248b57faab4b23b5and resource that has been designated as a CGI script using <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code> or <code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code>. The
20189240503ef2c8f5dc6e2248b57faab4b23b5and <var>action-type</var> can be either a <a href="/handler.html">handler</a> or a <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME content type</a>. It sends the URL and
20189240503ef2c8f5dc6e2248b57faab4b23b5and file path of the requested document using the standard CGI
20189240503ef2c8f5dc6e2248b57faab4b23b5and environment variables. The handler used for the particular request
20189240503ef2c8f5dc6e2248b57faab4b23b5and is passed using the <code>REDIRECT_HANDLER</code> variable.</p>
4aa603e6448b99f9371397d439795c91a93637eand <div class="example"><h3>Example: MIME type</h3><pre class="prettyprint lang-config"># Requests for files of a particular MIME content type:
be43dfdc0292dc9ec54820ced4ebb82507e3bd76rbowen <p>In this example, requests for files with a MIME content
06ba4a61654b3763ad65f52283832ebf058fdf1cslive specified cgi script <code>/cgi-bin/images.cgi</code>.</p>
4aa603e6448b99f9371397d439795c91a93637eand <div class="example"><h3>Example: File extension</h3><pre class="prettyprint lang-config"># Files of a particular file extension
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalicAddHandler my-file-type .xyz
be43dfdc0292dc9ec54820ced4ebb82507e3bd76rbowen <p>In this example, requests for files with a file extension of
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <code>.xyz</code> are handled by the specified cgi script
62160b002faf84ed5427a5b4ad264031eba3f908nd <p>The optional <code>virtual</code> modifier turns off the check
62160b002faf84ed5427a5b4ad264031eba3f908nd whether the requested file really exists. This is useful, for example,
62160b002faf84ed5427a5b4ad264031eba3f908nd if you want to use the <code class="directive">Action</code> directive in
62160b002faf84ed5427a5b4ad264031eba3f908nd virtual locations.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config"><Location "/news">
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic SetHandler news-handler
4aa603e6448b99f9371397d439795c91a93637eand</Location></pre>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<li><code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code></li>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<div class="directive-section"><h2><a name="Script" id="Script">Script</a> <a name="script" id="script">Directive</a></h2>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Activates a CGI script for a particular request
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Script <var>method</var> <var>cgi-script</var></code></td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_actions</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive adds an action, which will activate
67a715b4352c3e25bff32fccad48350180393f5end <var>cgi-script</var> when a file is requested using the method of
67a715b4352c3e25bff32fccad48350180393f5end <var>method</var>. The <var>cgi-script</var> is the URL-path to a
529258d4aa14c83ac8ef5392731cb58ac0068495nd resource that has been designated as a CGI script using <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code> or <code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code>. The URL and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive file path of the requested document is sent using the standard CGI
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <code>PATH_INFO</code> and <code>PATH_TRANSLATED</code> environment
725ecc2b5c7499ee392e85a151778718a8e33dcckess variables.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive Any arbitrary method name may be used. <strong>Method names are
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <p>Note that the <code class="directive">Script</code> command defines default
725ecc2b5c7499ee392e85a151778718a8e33dcckess actions only. If a CGI script is called, or some other resource that is
06ba4a61654b3763ad65f52283832ebf058fdf1cslive capable of handling the requested method internally, it will do
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf so. Also note that <code class="directive">Script</code> with a method of
725ecc2b5c7499ee392e85a151778718a8e33dcckess <code>GET</code> will only be called if there are query arguments present
06ba4a61654b3763ad65f52283832ebf058fdf1cslive (<em>e.g.</em>, foo.html?hi). Otherwise, the request will
06ba4a61654b3763ad65f52283832ebf058fdf1cslive proceed normally.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"># All GET requests go here
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic# A CGI PUT handler
8529679ec1c2e3285d9a2b0e124d3af16154c406kess<p><span>Available Languages: </span><a href="/de/mod/mod_actions.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
8529679ec1c2e3285d9a2b0e124d3af16154c406kess<a href="/en/mod/mod_actions.html" title="English"> en </a> |
cc8190433d13f5e9de618c5d7f10c824c0c1919cgryzor<a href="/fr/mod/mod_actions.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd<a href="/ja/mod/mod_actions.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/ko/mod/mod_actions.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
727872d18412fc021f03969b8641810d8896820bhumbedooh</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&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>
727872d18412fc021f03969b8641810d8896820bhumbedoohvar comments_shortname = 'httpd';
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohvar comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_actions.html';
0d0ba3a410038e179b695446bb149cce6264e0abnd(function(w, d) {
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread"><\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd var s = d.createElement('script');
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
0d0ba3a410038e179b695446bb149cce6264e0abnd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd})(window, document);
205f749042ed530040a4f0080dbcb47ceae8a374rjung<p class="apache">Copyright 2015 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>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.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[//><!--
0d0ba3a410038e179b695446bb149cce6264e0abndif (typeof(prettyPrint) !== 'undefined') {
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd prettyPrint();