mirror of
https://github.com/apache/httpd.git
synced 2025-11-02 06:53:27 +03:00
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331236 13f79535-47bb-0310-9956-ffa450edef68
137 lines
5.3 KiB
XML
137 lines
5.3 KiB
XML
<?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: 1174747:1331230 (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_version.xml.meta">
|
|
<name>mod_version</name>
|
|
<description>バージョン依存の設定</description>
|
|
<status>Extension</status>
|
|
<sourcefile>mod_version.c</sourcefile>
|
|
<identifier>version_module</identifier>
|
|
<compatibility>バージョン 2.0.56 以降</compatibility>
|
|
|
|
<summary>
|
|
<p>様々なバージョンの httpd の異なる設定を扱うことになる、
|
|
テストスイートや大規模ネットワークでの使用のために設計されています。
|
|
このモジュールは新しいコンテナ ― <directive
|
|
type="section" module="mod_version">IfVersion</directive> を
|
|
提供します。これを使うと、数字の比較や正規表現による柔軟な
|
|
バージョンチェックができるようになります。</p>
|
|
|
|
<example><title>例</title>
|
|
<IfVersion 2.1.0><br />
|
|
<indent>
|
|
# current httpd version is exactly 2.1.0<br />
|
|
</indent>
|
|
</IfVersion><br />
|
|
<br />
|
|
<IfVersion >= 2.2><br />
|
|
<indent>
|
|
# use really new features :-)<br />
|
|
</indent>
|
|
</IfVersion>
|
|
</example>
|
|
|
|
<p>詳細は以下を読んでください。</p>
|
|
</summary>
|
|
|
|
<directivesynopsis type="section">
|
|
<name>IfVersion</name>
|
|
<description>バージョン依存の設定を入れる</description>
|
|
<syntax><IfVersion [[!]<var>operator</var>] <var>version</var>> ...
|
|
</IfVersion></syntax>
|
|
<contextlist><context>server config</context><context>virtual host</context>
|
|
<context>directory</context><context>.htaccess</context></contextlist>
|
|
<override>All</override>
|
|
|
|
<usage>
|
|
<p><directive type="section">IfVersion</directive> は <program>httpd</program> のバージョン
|
|
が基準を満たしたときにのみ実行させたいディレクティブを囲みます。
|
|
通常の (数値) 比較のときは <var>version</var> 引数は
|
|
<code><var>major</var>[.<var>minor</var>[.<var>patch</var>]]</code> という
|
|
形式、例えば、<code>2.1.0</code> や <code>2.2</code> となります。
|
|
<var>minor</var> と <var>patch</var> は省略可能です。省略された場合は、
|
|
0 を指定したものとみなされます。比較には次の数値 <var>operator</var> を
|
|
指定できます:</p>
|
|
|
|
<table style="zebra" border="1">
|
|
<tr><th><var>operator</var></th><th>説明</th></tr>
|
|
<tr><td><code>=</code> と <code>==</code></td>
|
|
<td>同じ httpd バージョン</td></tr>
|
|
<tr><td><code>></code></td>
|
|
<td>より大きい httpd バージョン</td></tr>
|
|
<tr><td><code>>=</code></td>
|
|
<td>指定以上の httpd バージョン</td></tr>
|
|
<tr><td><code><</code></td>
|
|
<td>指定未満の httpd バージョン</td></tr>
|
|
<tr><td><code><=</code></td>
|
|
<td>指定以下の httpd バージョン</td></tr>
|
|
</table>
|
|
|
|
<example><title>例</title>
|
|
<IfVersion >= 2.1><br />
|
|
<indent>
|
|
# this happens only in versions greater or<br />
|
|
# equal 2.1.0.<br />
|
|
</indent>
|
|
</IfVersion>
|
|
</example>
|
|
|
|
<p>数値比較に加えて、http のバージョン番号に対して
|
|
<glossary ref="regex">正規表現</glossary>による
|
|
マッチングができます。二種類の書き方があります:</p>
|
|
|
|
<table style="zebra" border="1">
|
|
<tr><th><var>operator</var></th><th>説明</th></tr>
|
|
<tr><td><code>=</code> or <code>==</code></td>
|
|
<td><var>version</var> は
|
|
<code>/<var>regex</var>/</code> 形式</td></tr>
|
|
<tr><td><code>~</code></td>
|
|
<td><var>version</var> は
|
|
<code><var>regex</var></code> 形式</td></tr>
|
|
</table>
|
|
|
|
<example><title>例</title>
|
|
<IfVersion = /^2.1.[01234]$/><br />
|
|
<indent>
|
|
# e.g. workaround for buggy versions
|
|
</indent>
|
|
</IfVersion>
|
|
</example>
|
|
|
|
<p>マッチングの否定を表現するために、すべてのオペレータは前に
|
|
感嘆符 (<code>!</code>)を付けることができます:</p>
|
|
|
|
<example>
|
|
<IfVersion !~ ^2.1.[01234]$><br />
|
|
<indent>
|
|
# not for those versions<br />
|
|
</indent>
|
|
</IfVersion>
|
|
</example>
|
|
|
|
<p><var>operator</var> が省略されたときは <code>=</code> と
|
|
みなされます。</p>
|
|
</usage>
|
|
</directivesynopsis>
|
|
|
|
</modulesynopsis>
|