blob: 7f0d6584901cbbc1e54d364067dc86bdac3a908a [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
<!-- English Revision: 421174 -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<modulesynopsis metafile="mod_actions.xml.meta">
<name>mod_actions</name>
<description>メディアタイプやリクエストメソッドに応じて
CGI スクリプトを実行する機能を提供</description>
<status>Base</status>
<sourcefile>mod_actions.c</sourcefile>
<identifier>actions_module</identifier>
<summary>
<p>このモジュールには二つのディレクティブがあります。<directive
module="mod_actions">Action</directive>
ディレクティブは特定のタイプのファイルをリクエストされた場合に
CGI スクリプトが実行されるようにします。<directive
module="mod_actions">Script</directive>
ディレクティブはリクエストで特定のメソッドが使用されたときに CGI
スクリプトが実行されるようにします。
これはファイルを処理するスクリプトの実行をずっと簡単にします。</p>
</summary>
<seealso><module>mod_cgi</module></seealso>
<seealso><a href="../howto/cgi.html">CGI による動的コンテンツ</a></seealso>
<seealso><a href="../handler.html">Apache のハンドラの使用</a></seealso>
<directivesynopsis>
<name>Action</name>
<description>特定のハンドラやコンテントタイプに対して CGI を実行するように
設定</description>
<syntax>Action <var>action-type</var> <var>cgi-script</var></syntax>
<contextlist>
<context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
</contextlist>
<override>FileInfo</override>
<usage>
<p>このディレクティブは <var>action-type</var>
がリクエストされたときに <var>cgi-script</var>
が実行されるという動作を追加します。<var>cgi-script</var>
<directive module="mod_alias">ScriptAlias</directive>
<directive module="mod_mime">AddHandler</directive> によって
CGI スクリプトに設定されたリソースへの URL-path です。
<var>Action-type</var> には
<a href="../handler.html">handler</a> か MIME
コンテントタイプを指定できます。リクエストされたドキュメントの URL
とファイルのパスは標準 CGI 環境変数 PATH_INFO と PATH_TRANSLATED
を使って伝えられます。</p>
<example><title></title>
# Requests for files of a particular type:<br />
Action image/gif /cgi-bin/images.cgi<br />
<br />
# Files of a particular file extension<br />
AddHandler my-file-type .xyz<br />
Action my-file-type /cgi-bin/program.cgi<br />
</example>
<p>最初の例では、MIME コンテントタイプが <code>image/gif</code>
のファイルへのリクエストは、そのファイルの代わりに指定されたスクリプト
<code>/cgi-bin/images.cgi</code> が呼ばれます。</p>
<p>2 番目の例では、拡張子が <code>.xyz</code> のファイルへのリクエストは、
そのファイルの代わりに指定されたスクリプト
<code>/cgi-bin/program.cgi</code> が呼ばれます。</p>
</usage>
<seealso><directive module="mod_mime">AddHandler</directive></seealso>
</directivesynopsis>
<directivesynopsis>
<name>Script</name>
<description>特定のリクエストメソッドに対して CGI スクリプトを
実行するように設定</description>
<syntax>Script <var>method</var> <var>cgi-script</var></syntax>
<contextlist>
<context>server config</context><context>virtual host</context>
<context>directory</context></contextlist>
<usage>
<p>このディレクティブは <var>method</var>
というメソッドを使ってリクエストが行なわれたときに
<var>cgi-script</var> を実行するという動作を追加します。
<var>cgi-script</var>
<directive module="mod_alias">ScriptAlias</directive>
<directive module="mod_mime">AddHandler</directive> によって
CGI スクリプトに設定されたリソースへの URL-path です。
リクエストされたドキュメントの URL とファイルのパスは標準 CGI
環境変数 PATH_INFO と PATH_TRANSLATED を使って伝えられます。</p>
<note>
任意のメソッド名を使用することができます。
<strong>メソッド名は大文字小文字を区別します</strong>。ですから、
<code>Script PUT</code><code>Script put</code>
はまったく違った効果になります。
</note>
<p>Script コマンドはデフォルトの動作を追加するだけであることに
注意してください。もし CGI スクリプトが呼ばれたり、リクエストされた
メソッドを内部で扱うことのできる他のリソースがあれば、それが行なわれます。
<code>GET</code> メソッドの Script は問合せ引数がある場合にのみ
(<em>たとえば</em>、foo.html?hi) 呼ばれるということにも注意してください。
そうでない場合は、リクエストは通常通り処理されます。</p>
<example><title></title>
# For &lt;ISINDEX&gt;-style searching<br />
Script GET /cgi-bin/search<br />
<br />
# A CGI PUT handler<br />
Script PUT /~bob/put.cgi<br />
</example>
</usage>
</directivesynopsis>
</modulesynopsis>