]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_actions.xml.ja
ye gods what have I done
[apache] / docs / manual / mod / mod_actions.xml.ja
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
4 <!-- English Revision: 420990:1437836 (outdated) -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <modulesynopsis metafile="mod_actions.xml.meta">
24
25 <name>mod_actions</name> 
26
27 <description>メディアタイプやリクエストメソッドに応じて
28 CGI スクリプトを実行する機能を提供</description>
29
30 <status>Base</status>
31 <sourcefile>mod_actions.c</sourcefile>
32 <identifier>actions_module</identifier>
33
34 <summary>
35     <p>このモジュールには二つのディレクティブがあります。<directive
36     module="mod_actions">Action</directive>
37     ディレクティブは特定の <glossary ref="mime-type">MIME タイプ</glossary>のファイルをリクエストされた場合に
38     CGI スクリプトが実行されるようにします。<directive
39     module="mod_actions">Script</directive>
40     ディレクティブはリクエストで特定のメソッドが使用されたときに CGI
41     スクリプトが実行されるようにします。
42     これはファイルを処理するスクリプトの実行をずっと簡単にします。</p>
43 </summary>
44
45 <seealso><module>mod_cgi</module></seealso>
46 <seealso><a href="../howto/cgi.html">CGI による動的コンテンツ</a></seealso>
47 <seealso><a href="../handler.html">Apache のハンドラの使用</a></seealso>
48
49 <directivesynopsis>
50 <name>Action</name>
51 <description>特定のハンドラやコンテントタイプに対して CGI を実行するように
52 設定</description>
53 <syntax>Action <var>action-type</var> <var>cgi-script</var> [virtual]</syntax>
54 <contextlist>
55 <context>server config</context><context>virtual host</context>
56 <context>directory</context><context>.htaccess</context>
57 </contextlist>
58 <override>FileInfo</override>
59 <compatibility><code>virtual</code> 修飾子とハンドラ渡しは
60 Apache 2.1 で導入されました</compatibility>
61
62 <usage>
63     <p>このディレクティブは <var>action-type</var>
64     がリクエストされたときに <var>cgi-script</var>
65     が実行されるという動作を追加します。<var>cgi-script</var> は
66     <directive module="mod_alias">ScriptAlias</directive> や
67     <directive module="mod_mime">AddHandler</directive> によって
68     CGI スクリプトに設定されたリソースへの URL-path です。
69     <var>Action-type</var> には
70     <a href="../handler.html">handler</a> か <glossary ref="mime-type">MIME
71     コンテントタイプ</glossary>を指定できます。リクエストされたドキュメントの URL
72     とファイルのパスは標準 CGI 環境変数 <code>PATH_INFO</code> と
73     <code>PATH_TRANSLATED</code> を使って伝えられます。
74     特定のリクエストに対して使用されるハンドラへは、
75     <code>REDIRECT_HANDLER</code> 変数を使って渡せます。</p>
76
77     <example><title>例</title>
78       # Requests for files of a particular MIME content type:<br />
79       Action image/gif /cgi-bin/images.cgi<br />
80       <br />
81       # Files of a particular file extension<br />
82       AddHandler my-file-type .xyz<br />
83       Action my-file-type /cgi-bin/program.cgi<br />
84     </example>
85
86     <p>最初の例では、MIME コンテントタイプが <code>image/gif</code>
87     のファイルへのリクエストは、指定したスクリプト
88     <code>/cgi-bin/images.cgi</code> で処理されます。</p>
89
90     <p>2 番目の例では、拡張子が <code>.xyz</code> 
91     のファイルへのリクエストは、指定したスクリプト
92     <code>/cgi-bin/program.cgi</code> で処理されます。</p>
93
94     <p>オプションの <code>virtual</code> 修飾子を使用すると、
95     リクエストされたファイルが実際に存在するかどうかを検査しないようにできます。
96     これは例えば、<directive>Action</directive> ディレクティブをバーチャルな
97     Location に使用したい、といった場合に便利です。</p>
98
99     <example><title>例</title>
100       &lt;Location /news&gt;<br />
101       <indent>
102         SetHandler news-handler<br />
103         Action news-handler /cgi-bin/news.cgi virtual<br />
104       </indent>
105       &lt;/Location&gt;
106     </example>
107 </usage>
108
109 <seealso><directive module="mod_mime">AddHandler</directive></seealso>
110 </directivesynopsis>
111
112 <directivesynopsis>
113 <name>Script</name>
114 <description>特定のリクエストメソッドに対して CGI スクリプトを
115 実行するように設定</description>
116 <syntax>Script <var>method</var> <var>cgi-script</var></syntax>
117 <contextlist>
118 <context>server config</context><context>virtual host</context>
119 <context>directory</context></contextlist>
120 <usage>
121     <p>このディレクティブは <var>method</var>
122     というメソッドを使ってリクエストが行なわれたときに
123     <var>cgi-script</var> を実行するという動作を追加します。
124     <var>cgi-script</var> は
125     <directive module="mod_alias">ScriptAlias</directive> や
126     <directive module="mod_mime">AddHandler</directive> によって
127     CGI スクリプトに設定されたリソースへの URL-path です。
128     リクエストされたドキュメントの URL とファイルのパスは標準 CGI
129     環境変数 <code>PATH_INFO</code> と <code>PATH_TRANSLATED</code>
130     を使って伝えられます。</p>
131
132     <note>
133       任意のメソッド名を使用することができます。
134       <strong>メソッド名は大文字小文字を区別します</strong>。ですから、
135       <code>Script PUT</code> と <code>Script put</code>
136       はまったく違った効果になります。
137     </note>
138
139     <p><directive>Script</directive> コマンドはデフォルトの動作を
140     追加するだけであることに
141     注意してください。もし CGI スクリプトが呼ばれたり、リクエストされた
142     メソッドを内部で扱うことのできる他のリソースがあれば、それが行なわれます。
143     <code>GET</code> メソッドの <directive>Script</directive> は問合せ
144     引数がある場合にのみ
145     (<em>たとえば</em>、foo.html?hi) 呼ばれるということにも注意してください。
146     そうでない場合は、リクエストは通常通り処理されます。</p>
147
148     <example><title>例</title>
149       # For &lt;ISINDEX&gt;-style searching<br />
150       Script GET /cgi-bin/search<br />
151       <br />
152       # A CGI PUT handler<br />
153       Script PUT /~bob/put.cgi<br />
154     </example>
155 </usage>
156 </directivesynopsis>
157
158 </modulesynopsis>