mod_actions.xml revision 6fbd2e53c97ea6976d93e0ac521adabc55e0fb73
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Copyright 2002-2004 The Apache Software Foundation
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed under the Apache License, Version 2.0 (the "License");
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding you may not use this file except in compliance with the License.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding You may obtain a copy of the License at
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Unless required by applicable law or agreed to in writing, software
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd distributed under the License is distributed on an "AS IS" BASIS,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd limitations under the License.
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<description>This module provides for executing CGI scripts based on
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantzmedia type or request method.</description>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz <p>This module has two directives. The <directive
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz module="mod_actions">Action</directive> directive lets you run CGI
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz scripts whenever a file of a certain MIME content type is requested. The
3604deb3632beeca54cfdb3864d872715971c300slive <directive module="mod_actions">Script</directive> directive lets
3604deb3632beeca54cfdb3864d872715971c300slive you run CGI scripts whenever a particular method is used in a
3604deb3632beeca54cfdb3864d872715971c300slive request. This makes it much easier to execute scripts that process
87a0e78ba862eb998ccd545ae27c46c7ef89215abnicholes<seealso><a href="/howto/cgi.html">Dynamic Content with CGI</a></seealso>
ac1a656380fb9c5636a1f41b7e284f8eb2d60011chrisd<seealso><a href="/handler.html">Apache's Handler Use</a></seealso>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<directivesynopsis>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<description>Activates a CGI script for a particular handler or
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantzcontent-type</description>
3604deb3632beeca54cfdb3864d872715971c300slive<syntax>Action <var>action-type</var> <var>cgi-script</var> [virtual]</syntax>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd<contextlist>
3604deb3632beeca54cfdb3864d872715971c300slive<context>server config</context><context>virtual host</context>
f07998c217193b829f55c5ca8f4313ad5ba28f84nd</contextlist>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<compatibility>The <code>virtual</code> modifier and handler passing were
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantzintroduced in Apache 2.1</compatibility>
3604deb3632beeca54cfdb3864d872715971c300slive <p>This directive adds an action, which will activate
3604deb3632beeca54cfdb3864d872715971c300slive <var>cgi-script</var> when <var>action-type</var> is triggered by the
3604deb3632beeca54cfdb3864d872715971c300slive request. The <var>cgi-script</var> is the URL-path to a resource
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd that has been designated as a CGI script using <directive
3604deb3632beeca54cfdb3864d872715971c300slive href="/handler.html">handler</a> or a MIME content type. It
a5bff87eecd8413fcbee33eae01db42945b76becrbowen sends the URL and file path of the requested document using the
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd standard CGI <code>PATH_INFO</code> and <code>PATH_TRANSLATED</code>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd environment variables. The handler used for the particular request is
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd passed using the <code>REDIRECT_HANDLER</code> variable.</p>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd # Requests for files of a particular MIME content type:<br />
3604deb3632beeca54cfdb3864d872715971c300slive # Files of a particular file extension<br />
3604deb3632beeca54cfdb3864d872715971c300slive AddHandler my-file-type .xyz<br />
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz <p>In the first example, requests for files with a MIME content
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz type of <code>image/gif</code> will be handled by the
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz specified cgi script <code>/cgi-bin/images.cgi</code>.</p>
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd <p>In the second example, requests for files with a file extension of
35ffb30f57f777dbf3f17c5a5ddf706559942c16nd <code>.xyz</code> are handled by the specified cgi script
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz <p>The optional <code>virtual</code> modifier turns off the check
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz whether the requested file really exists. This is useful, for example,
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz if you want to use the <directive>Action</directive> directive in
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz virtual locations.</p>
3604deb3632beeca54cfdb3864d872715971c300slive <Location /news><br />
3604deb3632beeca54cfdb3864d872715971c300slive SetHandler news-handler<br />
3604deb3632beeca54cfdb3864d872715971c300slive </Location>
3604deb3632beeca54cfdb3864d872715971c300slive<seealso><directive module="mod_mime">AddHandler</directive></seealso>
3604deb3632beeca54cfdb3864d872715971c300slive</directivesynopsis>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<directivesynopsis>
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantz<description>Activates a CGI script for a particular request
f43ed9051a7f4db461d67ed4f7ece175b3dbca7cjerenkrantzmethod.</description>