mod_actions.html revision 9f0c715c7f536475c80dc07f02cf4147768cc4a8
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
530eba85dbd41b8a0fa5255d3648d1440199a661slive<HTML>
e942c741056732f50da2074b36fe59805d370650slive<HEAD>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<TITLE>Module mod_actions</TITLE>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd</HEAD>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<BODY
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding BGCOLOR="#FFFFFF"
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding TEXT="#000000"
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding LINK="#0000FF"
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding VLINK="#000080"
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd ALINK="#FF0000"
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<!--#include virtual="header.html" -->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<H1 ALIGN="CENTER">Module mod_actions</H1>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<P>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndThis module is contained in the <CODE>mod_actions.c</CODE> file, and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndis compiled in by default. It provides for
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndexecuting CGI scripts based on media type or request method. It is not
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdndpresent in versions prior to Apache 1.1.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd</P>
7db9f691a00ead175b03335457ca296a33ddf31bnd<H2>Summary</H2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<P>
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveThis module lets you run CGI scripts whenever a file of a certain type
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveis requested. This makes it much easier to execute scripts that
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveprocess files.
530eba85dbd41b8a0fa5255d3648d1440199a661slive</P>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<H2>Directives</H2>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<UL>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<LI><A HREF="#action">Action</A>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<LI><A HREF="#script">Script</A>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</UL>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<HR>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<H2><A NAME="action">Action directive</A></H2>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<P>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<A
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic HREF="directive-dict.html#Syntax"
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic REL="Help"
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic><STRONG>Syntax:</STRONG></A> Action <EM>action-type cgi-script</EM><BR>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<A
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor HREF="directive-dict.html#Context"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe REL="Help"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe><STRONG>Context:</STRONG></A> server config, virtual host, directory,
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe .htaccess<BR>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<A
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe HREF="directive-dict.html#Override"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe REL="Help"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe><STRONG>Override:</STRONG></A> FileInfo<BR>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<A
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier HREF="directive-dict.html#Status"
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier REL="Help"
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier><STRONG>Status:</STRONG></A> Base<BR>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier<A
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier HREF="directive-dict.html#Module"
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier REL="Help"
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna><STRONG>Module:</STRONG></A> mod_actions<BR>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<A
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna HREF="directive-dict.html#Compatibility"
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna REL="Help"
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna><STRONG>Compatibility:</STRONG></A> Action is only available in Apache 1.1
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorand later
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</P>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<P>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorThis directive adds an action, which will activate <EM>cgi-script</EM> when
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<EM>action-type</EM> is triggered by the request. The <EM>action-type</EM> can
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorbe either a <A HREF="/handler.html">handler</A> or a MIME content type. It
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernasends the URL and file path of the requested document using the standard CGI
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernaPATH_INFO and PATH_TRANSLATED environment variables.
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</P>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<HR>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<H2><A NAME="script">Script directive</A></H2>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<P>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<A
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna HREF="directive-dict.html#Syntax"
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna REL="Help"
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor><STRONG>Syntax:</STRONG></A> Script <EM>method cgi-script</EM><BR>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<A
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor HREF="directive-dict.html#Context"
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna REL="Help"
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna><STRONG>Context:</STRONG></A> server config, virtual host, directory<BR>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<A
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe HREF="directive-dict.html#Status"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe REL="Help"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe><STRONG>Status:</STRONG></A> Base<BR>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<A
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe HREF="directive-dict.html#Module"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe REL="Help"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe><STRONG>Module:</STRONG></A> mod_actions<BR>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<A
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe HREF="directive-dict.html#Compatibility"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe REL="Help"
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe><STRONG>Compatibility:</STRONG></A> Script is only available in Apache 1.1
5ae609a8a09239d20f48a4a95c4f21b713995babwroweand later; arbitrary method use is only available with 1.3.10 and later
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe</P>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<P>
5ae609a8a09239d20f48a4a95c4f21b713995babwroweThis directive adds an action, which will activate <i>cgi-script</i> when
5ae609a8a09239d20f48a4a95c4f21b713995babwrowea file is requested using the method of <i>method</i>. It sends the
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalicURL and file path of the requested document using the standard
5ae609a8a09239d20f48a4a95c4f21b713995babwroweCGI PATH_INFO and PATH_TRANSLATED environment variables.
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe</P>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<blockquote>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorPrior to Apache 1.3.10, <i>method</i> can only be
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernaone of <code>GET</code>, <code>POST</code>, <code>PUT</code>, or
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<code>DELETE</code>. As of 1.3.10, any arbitrary method name
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowenmay be used. <b>Method names are case-sensitive</b>, so
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<code>Script&nbsp;PUT</code> and <code>Script&nbsp;put</code>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernahave two entirely different effects.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</blockquote>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<P>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessNote that the Script command defines default actions only. If a CGI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivescript is called, or some other resource that is capable of handling
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivethe requested method internally, it will do so. Also note that Script
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewith a method of <CODE>GET</CODE> will only be called if there are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivequery arguments present (<EM>e.g.</EM>, foo.html?hi). Otherwise, the request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewill proceed normally.
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele</P>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<P>
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveExamples:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</P>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<PRE>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Script GET /cgi-bin/search #<EM>e.g.</EM> for &lt;ISINDEX&gt;-style searching
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Script PUT /~bob/put.cgi
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</PRE>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<!--#include virtual="footer.html" -->
fb77c505254b6e9c925e23e734463e87574f8f40kess</BODY>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</HTML>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive