1<?xml version="1.0" encoding="UTF-8"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!-- 4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 5 This file is generated from xml source: DO NOT EDIT 6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 7 --> 8<title>mod_actions - Apache HTTP サーバ</title> 9<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> 10<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> 11<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" /> 12<script src="/style/scripts/prettify.js" type="text/javascript"> 13</script> 14 15<link href="/images/favicon.ico" rel="shortcut icon" /></head> 16<body> 17<div id="page-header"> 18<p class="menu"><a href="/mod/">モジュール</a> | <a href="/mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">用語</a> | <a href="/sitemap.html">サイトマップ</a></p> 19<p class="apache">Apache HTTP サーバ バージョン 2.2</p> 20<img alt="" src="/images/feather.gif" /></div> 21<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div> 22<div id="path"> 23<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP サーバ</a> > <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> > <a href="../">バージョン 2.2</a> > <a href="./">モジュール</a></div> 24<div id="page-content"> 25<div id="preamble"><h1>Apache モジュール mod_actions</h1> 26<div class="toplang"> 27<p><span>翻訳済み言語: </span><a href="/de/mod/mod_actions.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | 28<a href="/en/mod/mod_actions.html" hreflang="en" rel="alternate" title="English"> en </a> | 29<a href="/ja/mod/mod_actions.html" title="Japanese"> ja </a> | 30<a href="/ko/mod/mod_actions.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p> 31</div> 32<table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>メディアタイプやリクエストメソッドに応じて 33CGI スクリプトを実行する機能を提供</td></tr> 34<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Base</td></tr> 35<tr><th><a href="module-dict.html#ModuleIdentifier">モジュール識別子:</a></th><td>actions_module</td></tr> 36<tr><th><a href="module-dict.html#SourceFile">ソースファイル:</a></th><td>mod_actions.c</td></tr></table> 37<h3>概要</h3> 38 39 <p>このモジュールには二つのディレクティブがあります。<code class="directive"><a href="#action">Action</a></code> 40 ディレクティブは特定の <a class="glossarylink" href="/glossary.html#mime-type" title="用語集を参照">MIME タイプ</a> 41 のファイルをリクエストされた場合に 42 CGI スクリプトが実行されるようにします。<code class="directive"><a href="#script">Script</a></code> 43 ディレクティブはリクエストで特定のメソッドが使用されたときに CGI 44 スクリプトが実行されるようにします。 45 これはファイルを処理するスクリプトの実行をずっと簡単にします。</p> 46</div> 47<div id="quickview"><h3 class="directives">ディレクティブ</h3> 48<ul id="toc"> 49<li><img alt="" src="/images/down.gif" /> <a href="#action">Action</a></li> 50<li><img alt="" src="/images/down.gif" /> <a href="#script">Script</a></li> 51</ul> 52<h3>参照</h3> 53<ul class="seealso"> 54<li><code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code></li> 55<li><a href="/howto/cgi.html">CGI による動的コンテンツ</a></li> 56<li><a href="/handler.html">Apache のハンドラの使用</a></li> 57</ul><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div> 58 59<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 60<div class="directive-section"><h2><a name="Action" id="Action">Action</a> <a name="action" id="action">ディレクティブ</a></h2> 61<table class="directive"> 62<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>特定のハンドラやコンテントタイプに対して CGI を実行するように 63設定</td></tr> 64<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Action <var>action-type</var> <var>cgi-script</var> [virtual]</code></td></tr> 65<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr> 66<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr> 67<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> 68<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_actions</td></tr> 69<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td><code>virtual</code> 修飾子とハンドラ渡しは 70Apache 2.1 で導入されました</td></tr> 71</table> 72 <p>このディレクティブは <var>action-type</var> 73 がリクエストされたときに <var>cgi-script</var> 74 が実行されるという動作を追加します。<var>cgi-script</var> は 75 <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code> や 76 <code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code> によって 77 CGI スクリプトに設定されたリソースへの URL-path です。 78 <var>Action-type</var> には 79 <a href="/handler.html">handler</a> か <a class="glossarylink" href="/glossary.html#mime-type" title="用語集を参照">MIME 80 コンテントタイプ</a>を指定できます。リクエストされたドキュメントの URL 81 とファイルのパスは標準 CGI 環境変数 <code>PATH_INFO</code> と 82 <code>PATH_TRANSLATED</code> を使って伝えられます。 83 特定のリクエストに対して使用されるハンドラへは、 84 <code>REDIRECT_HANDLER</code> 変数を使って渡せます。</p> 85 86 <div class="example"><h3>例</h3><p><code> 87 # Requests for files of a particular MIME content type:<br /> 88 Action image/gif /cgi-bin/images.cgi<br /> 89 <br /> 90 # Files of a particular file extension<br /> 91 AddHandler my-file-type .xyz<br /> 92 Action my-file-type /cgi-bin/program.cgi<br /> 93 </code></p></div> 94 95 <p>最初の例では、MIME コンテントタイプが <code>image/gif</code> 96 のファイルへのリクエストは、指定したスクリプト 97 <code>/cgi-bin/images.cgi</code> で処理されます。</p> 98 99 <p>2 番目の例では、拡張子が <code>.xyz</code> 100 のファイルへのリクエストは、指定したスクリプト 101 <code>/cgi-bin/program.cgi</code> で処理されます。</p> 102 103 <p>オプションの <code>virtual</code> 修飾子を使用すると、 104 リクエストされたファイルが実際に存在するかどうかを検査しないようにできます。 105 これは例えば、<code class="directive">Action</code> ディレクティブをバーチャルな 106 Location に使用したい、といった場合に便利です。</p> 107 108 <div class="example"><h3>例</h3><p><code> 109 <Location /news><br /> 110 <span class="indent"> 111 SetHandler news-handler<br /> 112 Action news-handler /cgi-bin/news.cgi virtual<br /> 113 </span> 114 </Location> 115 </code></p></div> 116 117<h3>参照</h3> 118<ul> 119<li><code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code></li> 120</ul> 121</div> 122<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 123<div class="directive-section"><h2><a name="Script" id="Script">Script</a> <a name="script" id="script">ディレクティブ</a></h2> 124<table class="directive"> 125<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>特定のリクエストメソッドに対して CGI スクリプトを 126実行するように設定</td></tr> 127<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Script <var>method</var> <var>cgi-script</var></code></td></tr> 128<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr> 129<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> 130<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_actions</td></tr> 131</table> 132 <p>このディレクティブは <var>method</var> 133 というメソッドを使ってリクエストが行なわれたときに 134 <var>cgi-script</var> を実行するという動作を追加します。 135 <var>cgi-script</var> は 136 <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code> や 137 <code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code> によって 138 CGI スクリプトに設定されたリソースへの URL-path です。 139 リクエストされたドキュメントの URL とファイルのパスは標準 CGI 140 環境変数 <code>PATH_INFO</code> と <code>PATH_TRANSLATED</code> 141 を使って伝えられます。</p> 142 143 <div class="note"> 144 任意のメソッド名を使用することができます。 145 <strong>メソッド名は大文字小文字を区別します</strong>。ですから、 146 <code>Script PUT</code> と <code>Script put</code> 147 はまったく違った効果になります。 148 </div> 149 150 <p><code class="directive">Script</code> コマンドはデフォルトの動作を 151 追加するだけであることに 152 注意してください。もし CGI スクリプトが呼ばれたり、リクエストされた 153 メソッドを内部で扱うことのできる他のリソースがあれば、それが行なわれます。 154 <code>GET</code> メソッドの <code class="directive">Script</code> は問合せ 155 引数がある場合にのみ 156 (<em>たとえば</em>、foo.html?hi) 呼ばれるということにも注意してください。 157 そうでない場合は、リクエストは通常通り処理されます。</p> 158 159 <div class="example"><h3>例</h3><p><code> 160 # For <ISINDEX>-style searching<br /> 161 Script GET /cgi-bin/search<br /> 162 <br /> 163 # A CGI PUT handler<br /> 164 Script PUT /~bob/put.cgi<br /> 165 </code></p></div> 166 167</div> 168</div> 169<div class="bottomlang"> 170<p><span>翻訳済み言語: </span><a href="/de/mod/mod_actions.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | 171<a href="/en/mod/mod_actions.html" hreflang="en" rel="alternate" title="English"> en </a> | 172<a href="/ja/mod/mod_actions.html" title="Japanese"> ja </a> | 173<a href="/ko/mod/mod_actions.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p> 174</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">コメント</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> 175<script type="text/javascript"><!--//--><![CDATA[//><!-- 176var comments_shortname = 'httpd'; 177var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_actions.html'; 178(function(w, d) { 179 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 180 d.write('<div id="comments_thread"><\/div>'); 181 var s = d.createElement('script'); 182 s.type = 'text/javascript'; 183 s.async = true; 184 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 185 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 186 } 187 else { 188 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 189 } 190})(window, document); 191//--><!]]></script></div><div id="footer"> 192<p class="apache">Copyright 2013 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p> 193<p class="menu"><a href="/mod/">モジュール</a> | <a href="/mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">用語</a> | <a href="/sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- 194if (typeof(prettyPrint) !== 'undefined') { 195 prettyPrint(); 196} 197//--><!]]></script> 198</body></html>