summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_info.xml.ja
blob: 40279f2d9fe06bda0a9282899a565da8e4b600fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?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: 450473:1334018 (outdated) -->

<!--
 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_info.xml.meta">

<name>mod_info</name>
<description>サーバの設定の包括的な概観を提供する</description>
<status>Extension</status>
<sourcefile>mod_info.c</sourcefile>
<identifier>info_module</identifier>

<summary>
    <p><module>mod_info</module> を設定するには、以下を <code>httpd.conf</code>
    ファイルに加えます。</p>

    <example>
      &lt;Location /server-info&gt;<br />
      <indent>
        SetHandler server-info<br />
      </indent>
      &lt;/Location&gt;
    </example>

    <p><directive type="section" module="core">Location</directive>
    の中で <module>mod_access</module> を使って、サーバ設定情報への
    アクセスを制限したいと思うかもしれません :</p>

    <example>
      &lt;Location /server-info&gt;<br />
      <indent>
        SetHandler server-info<br />
        Order deny,allow<br />
        Deny from all<br />
        Allow from yourcompany.com<br />
      </indent>
      &lt;/Location&gt;
    </example>

    <p>一旦設定すると、<code>http://your.host.example.com/server-info</code>
    にアクセスすることでサーバの情報を得られるようになります。</p>
</summary>

<section id="security"><title>Security Issues</title>
    <p>一旦 <module>mod_info</module> がサーバに読み込まれると、
    提供しているハンドラ機能はディレクトリ毎の設定ファイル (<em>例えば</em>
    .htaccess) を含む <em>すべて</em>の設定ファイルで有効になります。
    このモジュールを有効にするときはセキュリティの問題を考慮する必要が
    あるでしょう。</p>

    <p>特に、このモジュールはシステムパス、ユーザ名/パスワード、
    データベース名など、他の Apache モジュールの設定ディレクティブから
    セキュリティ上微妙な情報を漏らす可能性があります。
    ですから、このモジュールはきちんとアクセス制御された環境で<strong>のみ</strong>、
    注意して使ってください。</p>

    <p>設定情報へのアクセスを制限するために、<module>mod_authz_host</module> を
    使うのが良いでしょう。</p>
      
    <example><title>アクセス制御</title>
      &lt;Location /server-info&gt;<br />
      <indent>
        SetHandler server-info<br />
        Order allow,deny<br />
        # Allow access from server itself<br />
        Allow from 127.0.0.1<br />
        # Additionally, allow access from local workstation<br />
        Allow from 192.168.1.17<br />
      </indent>
      &lt;/Location&gt;
    </example>
</section>

<section id="queries"><title>表示される情報の選択</title>
    <p>デフォルトでは、サーバ情報はすべての有効なモジュールと、
    各モジュールについて、モジュールが理解するディレクティブ、
    実装している、フック、現時点での設定の関連するディレクティブに
    なっています。</p>

    <p><code>server-info</code> リクエストへクエリーを追加することで、
    設定情報の他の表示形式を選ぶことができます。例えば、
    <code>http://your.host.example.com/server-info?config</code> は
    すべての設定ディレクティブを表示します。</p>
    
    <dl>
        <dt><code>?&lt;module-name&gt;</code></dt>
            <dd>指定されたモジュールに関連する情報のみ</dd>
        <dt><code>?config</code></dt>
            <dd>モジュールでソートせずに、設定ディレクティブのみ</dd>
        <dt><code>?hooks</code></dt>
            <dd>各モジュールが使用するフックのみ</dd>
        <dt><code>?list</code></dt>
            <dd>有効なモジュールの簡単なリストのみ</dd>
        <dt><code>?server</code></dt>
            <dd>基本サーバ情報のみ</dd>
    </dl>
</section>

<section id="limitations"><title>既知の制限</title>
    <p><module>mod_info</module> は、元の設定ファイルを読むのではなく、
    既にパースされた設定を読み込むことで情報を提供します。従って、
    パース済みの設定情報の木が生成される方法による制限がいくつかあります:</p>
    <ul>
      <li>パースされた設定に保存されずに、すぐに実行されるディレクティブは
          一覧に現れません。これには
          <directive module="core">ServerRoot</directive>,
          <directive module="mod_so">LoadModule</directive>,
          <directive module="mod_so">LoadFile</directive> があります。</li>
      <li><directive module="core">Include</directive>,
          <directive module="core">&lt;IfModule&gt;</directive>,
          <directive module="core">&lt;IfDefine&gt;</directive>,
          のような設定ファイル自身を制御するディレクティブは表示されません。
          そのディレクティブの中にあり、有効になっているディレクティブは
          表示されます。</li>
      <li>コメントは表示されません。(これは仕様だと思ってください。)</li>
      <li><code>.htaccess</code> ファイルの設定ディレクティブは表示されません
          (永久的なサーバ設定の一部ではないからです)。</li>
      <li><directive module="core">&lt;Directory&gt;</directive>
          のようなコンテナディレクティブは普通に表示されますが、
          <module>mod_info</module> は閉じタグの <directive module="core"
          >&lt;/Directory&gt;</directive> などの数を知ることはできません。</li>
      <li><module>mod_perl</module> のようなサードパーティモジュール
           のディレクティブは表示されないかもしれません。</li>
    </ul>
</section>

<directivesynopsis>
<name>AddModuleInfo</name>
<description>server-info ハンドラにより表示されるモジュールの情報に
追加の情報を付け加える</description>
<syntax>AddModuleInfo <var>module-name</var> <var>string</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<compatibility>Apache 1.3 以降</compatibility>

<usage>
    <p>これは、<var>string</var> の内容がモジュール <var>module-name</var>
    の<strong>追加情報</strong> として HTML
    として解釈され、表示されるようにします。例:</p>

    <example>
      AddModuleInfo mod_deflate.c 'See &lt;a \<br />
      <indent>
        href="http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html"&gt;\<br />
        http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html&lt;/a&gt;'
      </indent>
    </example>
</usage>

</directivesynopsis>
</modulesynopsis>