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_log_forensic - 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_log_forensic</h1> 26<div class="toplang"> 27<p><span>翻訳済み言語: </span><a href="/en/mod/mod_log_forensic.html" hreflang="en" rel="alternate" title="English"> en </a> | 28<a href="/ja/mod/mod_log_forensic.html" title="Japanese"> ja </a> | 29<a href="/tr/mod/mod_log_forensic.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 30</div> 31<div class="outofdate">この日本語訳はすでに古くなっている 32 可能性があります。 33 最近更新された内容を見るには英語版をご覧下さい。 34 </div> 35<table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>サーバに送られたリクエストの forensic ロギング</td></tr> 36<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Extension</td></tr> 37<tr><th><a href="module-dict.html#ModuleIdentifier">モジュール識別子:</a></th><td>log_forensic_module</td></tr> 38<tr><th><a href="module-dict.html#SourceFile">ソースファイル:</a></th><td>mod_log_forensic.c</td></tr> 39<tr><th><a href="module-dict.html#Compatibility">互換性:</a></th><td><code class="module"><a href="/mod/mod_unique_id.html">mod_unique_id</a></code> はバージョン 2.1 からは必須では 40なくなった</td></tr></table> 41<h3>概要</h3> 42 43 <p>このモジュールはクライアントリクエストの forensic ロギングを 44 行ないます。ログ収集はリクエストの処理の前と後に行なわれますので、 45 forensic ログは各リクエストに対して二行ログ収集します。 46 Forensic ロガーは非常に厳密です。これは以下のことを意味します:</p> 47 48 <ul> 49 <li>フォーマットは固定です。実行時にロギングフォーマットを変更することは 50 できません。</li> 51 <li>データを書けない場合は子プロセスはその場で終了し、さらにコアを 52 ダンプするかもしれません (<code class="directive"><a href="/mod/mpm_common.html#coredumpdirectory">CoreDumpDirectory</a></code> ディレクティブの設定に依ります)。</li> 53 </ul> 54 55 <p>Forensic ログの出力を検査するためには、 56 配布物の support ディレクトリにある <code>check_forensic</code> 57 スクリプトが役に立つでしょう。</p> 58</div> 59<div id="quickview"><h3 class="directives">ディレクティブ</h3> 60<ul id="toc"> 61<li><img alt="" src="/images/down.gif" /> <a href="#forensiclog">ForensicLog</a></li> 62</ul> 63<h3>トピック</h3> 64<ul id="topics"> 65<li><img alt="" src="/images/down.gif" /> <a href="#formats">Forensic ログフォーマット</a></li> 66<li><img alt="" src="/images/down.gif" /> <a href="#security">セキュリティの問題</a></li> 67</ul><h3>参照</h3> 68<ul class="seealso"> 69<li><a href="/logs.html">Apache ログファイル</a></li> 70<li><code class="module"><a href="/mod/mod_log_config.html">mod_log_config</a></code></li> 71</ul><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div> 72<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 73<div class="section"> 74<h2><a name="formats" id="formats">Forensic ログフォーマット</a></h2> 75 <p>各リクエストは2回ログ収集されます。最初はリクエストが処理される 76 <em>前</em> (つまり、ヘッダを受け取った後) です。2度目のログは 77 リクエストが処理された<em>後</em>、通常のログ収集と同じときに 78 行なわれます。</p> 79 80 <p>各リクエストを識別するために、リクエストには 81 一意なリクエスト ID が割り当てられます。この forensic ID は 82 フォーマット文字列 <code>%{forensic-id}n</code> を使うことで 83 通常の transfer ログにログ収集することもできます。 84 <code class="module"><a href="/mod/mod_unique_id.html">mod_unique_id</a></code> を使っている場合は、それが生成する 85 ID が使われます。</p> 86 87 <p>最初の行は forensic ID、リクエスト行と受け取ったすべてのヘッダを 88 パイプ文字 (<code>|</code>) で分離してログ収集します。 89 例えば以下のようになります (実際はすべて同じ行になります):</p> 90 91 <div class="example"><p><code> 92 +yQtJf8CoAB4AAFNXBIEAAAAA|GET /manual/de/images/down.gif 93 HTTP/1.1|Host:localhost%3a8080|User-Agent:Mozilla/5.0 (X11; 94 U; Linux i686; en-US; rv%3a1.6) Gecko/20040216 95 Firefox/0.8|Accept:image/png, <var>etc...</var> 96 </code></p></div> 97 98 <p>最初のプラス文字がこのログは最初のログであることを示します。 99 二番目の行はマイナス文字と ID のみです:</p> 100 101 <div class="example"><p><code> 102 -yQtJf8CoAB4AAFNXBIEAAAAA 103 </code></p></div> 104 105 <p><code>check_forensic</code> スクリプトは引数としてログファイルの名前を 106 取ります。<code>+</code>/<code>-</code> の ID の組を調べ、完了していない 107 リクエストがある場合は警告を発します。</p> 108</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 109<div class="section"> 110<h2><a name="security" id="security">セキュリティの問題</a></h2> 111 <p>ログファイルが保存されるディレクトリがサーバを起動したユーザ 112 以外で書き込み可能になっているときにセキュリティが破られる可能性が 113 あることについての詳細は<a href="/misc/security_tips.html#serverroot">セキュリティのこつ</a>を 114 参照してください。</p> 115</div> 116<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 117<div class="directive-section"><h2><a name="ForensicLog" id="ForensicLog">ForensicLog</a> <a name="forensiclog" id="forensiclog">ディレクティブ</a></h2> 118<table class="directive"> 119<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Forensic ログのファイル名を設定する</td></tr> 120<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ForensicLog <var>filename</var>|<var>pipe</var></code></td></tr> 121<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr> 122<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr> 123<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_log_forensic</td></tr> 124</table> 125 <p><code class="directive">ForensicLog</code> ディレクティブは forensic 解析のための 126 サーバへのリクエストをログ収集に使います。 127 各ログエントリには、普通の <code class="directive"><a href="/mod/mod_log_config.html#customlog">CustomLog</a></code> ディレクティブを使ってリクエストと関連付けることの 128 できる 129 一意な ID が割り当てられます。<code class="module"><a href="/mod/mod_log_forensic.html">mod_log_forensic</a></code> は 130 <code>forensic-id</code> というトークンを作成し、フォーマット文字列 131 <code>%{forensic-id}n</code> を使うことでそのトークンを transfer ログに 132 追加することができます。</p> 133 134 <p>引数はログが書き出される位置を指定し、以下の 2種類の値のどちらかを 135 取ることができます:</p> 136 137 <dl> 138 <dt><var>filename</var></dt> 139 <dd><code class="directive"><a href="/mod/core.html#serverroot">ServerRoot</a></code> からの 140 相対ファイル名</dd> 141 142 <dt><var>pipe</var></dt> 143 <dd>パイプ文字 "<code>|</code>" と、その後にログ情報を標準入力から 144 受け取るプログラム。プログラム名は <code class="directive"><a href="/mod/core.html#serverroot">ServerRoot</a></code> からの相対パスとしても 145 指定できます。 146 147 <div class="warning"><h3>セキュリティ:</h3> 148 <p>プログラムを使う場合、そのプログラムは <code class="program"><a href="/programs/httpd.html">httpd</a></code> を起動したユーザで 149 実行されます。つまり、サーバが root で実行された場合は root で 150 実行されるということです。プログラムが安全であるか、より権限の少ない 151 ユーザに切り替えるようになっていることを確かめてください。</p> 152 </div> 153 154 <div class="note"><h3>注</h3> 155 <p>Unix 以外のプラットフォームでファイル名を入力するときは、 156 プラットフォームがバックスラッシュの使用を許可している場合でも、 157 スラッシュのみが使われるように気をつけてください。 158 普通は設定ファイルすべてにおいて、スラッシュの方を使用するように 159 してください。</p> 160 </div></dd> 161 </dl> 162 163</div> 164</div> 165<div class="bottomlang"> 166<p><span>翻訳済み言語: </span><a href="/en/mod/mod_log_forensic.html" hreflang="en" rel="alternate" title="English"> en </a> | 167<a href="/ja/mod/mod_log_forensic.html" title="Japanese"> ja </a> | 168<a href="/tr/mod/mod_log_forensic.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 169</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> 170<script type="text/javascript"><!--//--><![CDATA[//><!-- 171var comments_shortname = 'httpd'; 172var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_log_forensic.html'; 173(function(w, d) { 174 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 175 d.write('<div id="comments_thread"><\/div>'); 176 var s = d.createElement('script'); 177 s.type = 'text/javascript'; 178 s.async = true; 179 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 180 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 181 } 182 else { 183 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 184 } 185})(window, document); 186//--><!]]></script></div><div id="footer"> 187<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> 188<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[//><!-- 189if (typeof(prettyPrint) !== 'undefined') { 190 prettyPrint(); 191} 192//--><!]]></script> 193</body></html>