]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_version.xml.ja
ye gods what have I done
[apache] / docs / manual / mod / mod_version.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: 1174747:1421821 (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_version.xml.meta">
24 <name>mod_version</name>
25 <description>バージョン依存の設定</description>
26 <status>Extension</status>
27 <sourcefile>mod_version.c</sourcefile>
28 <identifier>version_module</identifier>
29 <compatibility>バージョン 2.0.56 以降</compatibility>
30
31 <summary>
32     <p>様々なバージョンの httpd の異なる設定を扱うことになる、
33     テストスイートや大規模ネットワークでの使用のために設計されています。
34     このモジュールは新しいコンテナ ― <directive
35     type="section" module="mod_version">IfVersion</directive> を
36     提供します。これを使うと、数字の比較や正規表現による柔軟な
37     バージョンチェックができるようになります。</p>
38
39     <example><title>例</title>
40       &lt;IfVersion 2.1.0&gt;<br />
41       <indent>
42         # current httpd version is exactly 2.1.0<br />
43       </indent>
44       &lt;/IfVersion&gt;<br />
45       <br />
46       &lt;IfVersion >= 2.2&gt;<br />
47       <indent>
48         # use really new features :-)<br />
49       </indent>
50       &lt;/IfVersion&gt;
51     </example>
52
53     <p>詳細は以下を読んでください。</p>
54 </summary>
55
56 <directivesynopsis type="section">
57 <name>IfVersion</name>
58 <description>バージョン依存の設定を入れる</description>
59 <syntax>&lt;IfVersion [[!]<var>operator</var>] <var>version</var>&gt; ...
60 &lt;/IfVersion&gt;</syntax>
61 <contextlist><context>server config</context><context>virtual host</context>
62 <context>directory</context><context>.htaccess</context></contextlist>
63 <override>All</override>
64
65 <usage>
66     <p><directive type="section">IfVersion</directive> は <program>httpd</program> のバージョン
67     が基準を満たしたときにのみ実行させたいディレクティブを囲みます。
68     通常の (数値) 比較のときは <var>version</var> 引数は
69     <code><var>major</var>[.<var>minor</var>[.<var>patch</var>]]</code> という
70     形式、例えば、<code>2.1.0</code> や <code>2.2</code> となります。
71     <var>minor</var> と <var>patch</var> は省略可能です。省略された場合は、
72     0 を指定したものとみなされます。比較には次の数値 <var>operator</var> を
73     指定できます:</p>
74
75     <table style="zebra" border="1">
76     <tr><th><var>operator</var></th><th>説明</th></tr>
77     <tr><td><code>=</code> と <code>==</code></td>
78         <td>同じ httpd バージョン</td></tr>
79     <tr><td><code>&gt;</code></td>
80         <td>より大きい httpd バージョン</td></tr>
81     <tr><td><code>&gt;=</code></td>
82         <td>指定以上の httpd バージョン</td></tr>
83     <tr><td><code>&lt;</code></td>
84         <td>指定未満の httpd バージョン</td></tr>
85     <tr><td><code>&lt;=</code></td>
86         <td>指定以下の httpd バージョン</td></tr>
87     </table>
88
89     <example><title>例</title>
90       &lt;IfVersion >= 2.1&gt;<br />
91       <indent>
92         # this happens only in versions greater or<br />
93         # equal 2.1.0.<br />
94       </indent>
95       &lt;/IfVersion&gt;
96     </example>
97
98     <p>数値比較に加えて、http のバージョン番号に対して
99     <glossary ref="regex">正規表現</glossary>による
100     マッチングができます。二種類の書き方があります:</p>
101
102     <table style="zebra" border="1">
103     <tr><th><var>operator</var></th><th>説明</th></tr>
104     <tr><td><code>=</code> or <code>==</code></td>
105         <td><var>version</var> は
106             <code>/<var>regex</var>/</code> 形式</td></tr>
107     <tr><td><code>~</code></td>
108         <td><var>version</var> は
109             <code><var>regex</var></code> 形式</td></tr>
110     </table>
111
112     <example><title>例</title>
113       &lt;IfVersion = /^2.1.[01234]$/&gt;<br />
114       <indent>
115         # e.g. workaround for buggy versions
116       </indent>
117       &lt;/IfVersion&gt;
118     </example>
119
120     <p>マッチングの否定を表現するために、すべてのオペレータは前に
121     感嘆符 (<code>!</code>)を付けることができます:</p>
122
123     <example>
124       &lt;IfVersion !~ ^2.1.[01234]$&gt;<br />
125       <indent>
126         # not for those versions<br />
127       </indent>
128       &lt;/IfVersion&gt;
129     </example>
130
131     <p><var>operator</var> が省略されたときは <code>=</code> と
132     みなされます。</p>
133 </usage>
134 </directivesynopsis>
135
136 </modulesynopsis>