bind.xml.ja revision 208651a016b098f4fa1f6279559f104d70f1632d
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki<?xml-stylesheet type="text/xsl" href="/style/manual.ja.xsl"?>
38d7b435c9e47c1549c7ec5e899c9461548a228derikabele<!-- English Revision: 327999:587444 (outdated) -->
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding the License. You may obtain a copy of the License at
acc36ab93565d2880447d535da6ca6e5feac7a70nd Unless required by applicable law or agreed to in writing, software
acc36ab93565d2880447d535da6ca6e5feac7a70nd distributed under the License is distributed on an "AS IS" BASIS,
acc36ab93565d2880447d535da6ca6e5feac7a70nd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
acc36ab93565d2880447d535da6ca6e5feac7a70nd See the License for the specific language governing permissions and
acc36ab93565d2880447d535da6ca6e5feac7a70nd limitations under the License.
208651a016b098f4fa1f6279559f104d70f1632dtakashi <seealso><a href="dns-caveats.html">DNS の問題</a></seealso>
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki <modulelist>
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki </modulelist>
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki <directivelist>
59d52c5719a3320d5775ab821b810f294e168f65yoshiki <directive module="core" type="section">VirtualHost</directive>
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki </directivelist>
208651a016b098f4fa1f6279559f104d70f1632dtakashi <p>Apache は起動時に、ローカルマシンのあるポートおよびアドレス
208651a016b098f4fa1f6279559f104d70f1632dtakashi に対して接続し、リクエストが来るのを待ちます。
208651a016b098f4fa1f6279559f104d70f1632dtakashi デフォルトではマシンのすべてのアドレスに対して listen します。
208651a016b098f4fa1f6279559f104d70f1632dtakashi しかしながら、特定のポートか、特定のアドレスのみか、
208651a016b098f4fa1f6279559f104d70f1632dtakashi またはそれらの組み合わせのいずれかを listen するようにする必要があります。
208651a016b098f4fa1f6279559f104d70f1632dtakashi これは、異なる IP アドレス、ホスト名、ポートに対する Apache
208651a016b098f4fa1f6279559f104d70f1632dtakashi の応答方法を決定するバーチャルホスト機能と組み合わせて使われます。</p>
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki <p><directive module="mpm_common">Listen</directive>
208651a016b098f4fa1f6279559f104d70f1632dtakashi ディレクティブで、特定のポートやアドレス・ポートの組からのみ入ってくる
208651a016b098f4fa1f6279559f104d70f1632dtakashi リクエストを受け付けるようにできます。
208651a016b098f4fa1f6279559f104d70f1632dtakashi もしポート番号のみが <directive module="mpm_common">Listen</directive>
208651a016b098f4fa1f6279559f104d70f1632dtakashi ディレクティブで指定された場合は、
208651a016b098f4fa1f6279559f104d70f1632dtakashi すべてのインターフェースの与えられたポート番号を
208651a016b098f4fa1f6279559f104d70f1632dtakashi listen します。 IP アドレスがポート番号と同時に与えられた場合は、
208651a016b098f4fa1f6279559f104d70f1632dtakashi サーバは与えられたポートとインターフェースを listen します。
208651a016b098f4fa1f6279559f104d70f1632dtakashi 複数の <directive module="mpm_common">Listen</directive> ディレクティブを用いて
208651a016b098f4fa1f6279559f104d70f1632dtakashi いくつかの listen するアドレスとポートを指定できます。
208651a016b098f4fa1f6279559f104d70f1632dtakashi サーバはリストされたアドレスやポートからのすべてのリクエストに
208651a016b098f4fa1f6279559f104d70f1632dtakashi 対して応答します。</p>
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki Listen 80<br />
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki Listen 8000
208651a016b098f4fa1f6279559f104d70f1632dtakashi 二つの指定されたインタフェースとポート番号に対しての接続を受け付けるには、
c601a4b92b8b16b4cfb3359b1a03cf0c1bc3bcf2colm Listen 192.0.2.1:80<br />
c601a4b92b8b16b4cfb3359b1a03cf0c1bc3bcf2colm Listen 192.0.2.5:8000
208651a016b098f4fa1f6279559f104d70f1632dtakashi IPv6 アドレスは、角括弧で次の例のように囲まなければいけません。</p>
cf02129aebf73dd0bdf369b172eb481ff76ac5f6colm Listen [2001:db8::a00:20ff:fea7:ccea]:80
208651a016b098f4fa1f6279559f104d70f1632dtakashi <p>多くのプラットホームで IPv6 がサポートされてきていて、
208651a016b098f4fa1f6279559f104d70f1632dtakashi <glossary>APR</glossary> はこれらのほとんどで IPv6 をサポートしているので、
208651a016b098f4fa1f6279559f104d70f1632dtakashi Apache は IPv6 ソケットを割り当てて IPv6
208651a016b098f4fa1f6279559f104d70f1632dtakashi 経由で送られてきたリクエストを扱うことができます。</p>
208651a016b098f4fa1f6279559f104d70f1632dtakashi <p>IPv6 ソケットが IPv4 と IPv6 コネクションの両方を扱うことができるか
208651a016b098f4fa1f6279559f104d70f1632dtakashi どうかは、Apache 管理者にとって厄介な問題です。
208651a016b098f4fa1f6279559f104d70f1632dtakashi IPv4 コネクションを IPv6 ソケットで扱う場合は、
208651a016b098f4fa1f6279559f104d70f1632dtakashi IPv4 マップされた IPv6 アドレスを使用していて、
208651a016b098f4fa1f6279559f104d70f1632dtakashi ほとんどのプラットホームではデフォルトで使用可能ですが、
208651a016b098f4fa1f6279559f104d70f1632dtakashi FreeBSD, NetBSD, OpenBSD では、システム全体としてのポリシーとの整合性から、
208651a016b098f4fa1f6279559f104d70f1632dtakashi デフォルトでは使用不可に設定されています。
208651a016b098f4fa1f6279559f104d70f1632dtakashi これらのデフォルトで使用不可のプラットホームであっても、
208651a016b098f4fa1f6279559f104d70f1632dtakashi 設定パラメータで Apache の挙動を変化させることができます。</p>
208651a016b098f4fa1f6279559f104d70f1632dtakashi <p>一方で、Linux や Tru64 といったプラットホームで IPv4 と IPv6
208651a016b098f4fa1f6279559f104d70f1632dtakashi IPv4 と IPv6 のコネクションを最小限のソケットで扱いたいのであれば、
208651a016b098f4fa1f6279559f104d70f1632dtakashi IPv4 マップの IPv6 アドレスを使用する必要があり、
d0e461f79912b6ba125ba7d7b0a8ed2966f0a44dyoshiki <code>--enable-v4-mapped</code> <program>configure</program>
208651a016b098f4fa1f6279559f104d70f1632dtakashi オプションを指定します。</p>
208651a016b098f4fa1f6279559f104d70f1632dtakashi FreeBSD, NetBSD, OpenBSD 以外の全てのプラットホームでのデフォルトです。
208651a016b098f4fa1f6279559f104d70f1632dtakashi ですから、おそらくお手元の Apache はこの設定でビルドされているでしょう。</p>
208651a016b098f4fa1f6279559f104d70f1632dtakashi <p>プラットフォームや APR が何をサポートするかに関わらず、
208651a016b098f4fa1f6279559f104d70f1632dtakashi IPv4 コネクションのみを扱うようにしたい場合は、
208651a016b098f4fa1f6279559f104d70f1632dtakashi <directive module="mpm_common">Listen</directive> ディレクティブで
208651a016b098f4fa1f6279559f104d70f1632dtakashi IPv4 アドレスを指定してください。</p>
498e8a909bc308283d3713bb348246fe51de059cyoshiki Listen 0.0.0.0:80<br />
c601a4b92b8b16b4cfb3359b1a03cf0c1bc3bcf2colm Listen 192.0.2.1:80
208651a016b098f4fa1f6279559f104d70f1632dtakashi <p>条件を満たすプラットホームで、Apache が
208651a016b098f4fa1f6279559f104d70f1632dtakashi IPv4 と IPv6 のコネクションを個別のソケットで扱うようにしたい場合
208651a016b098f4fa1f6279559f104d70f1632dtakashi (つまり IPv4 マップのアドレスを無効にしたい場合)
208651a016b098f4fa1f6279559f104d70f1632dtakashi オプションを指定して、次のように個別指定の
208651a016b098f4fa1f6279559f104d70f1632dtakashi ディレクティブを使用してください。
208651a016b098f4fa1f6279559f104d70f1632dtakashi FreeBSD, NetBSD, OpenBSD プラットホームでのデフォルトです。</p>
208651a016b098f4fa1f6279559f104d70f1632dtakashi でバーチャルホストが実装されるわけではありません。
208651a016b098f4fa1f6279559f104d70f1632dtakashi Listen は単にメインサーバにどのアドレスとポートを listen すべきかを
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki <directive module="core" type="section">VirtualHost</directive>
208651a016b098f4fa1f6279559f104d70f1632dtakashi ディレクティブが使われない場合は、
208651a016b098f4fa1f6279559f104d70f1632dtakashi 受け入れたリクエストすべてに対して全く同じ挙動をします。
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki <directive module="core" type="section">VirtualHost</directive>
208651a016b098f4fa1f6279559f104d70f1632dtakashi 一つ以上のアドレスやポートに対して異なる挙動をするように
208651a016b098f4fa1f6279559f104d70f1632dtakashi 指定することができます。
208651a016b098f4fa1f6279559f104d70f1632dtakashi VirtualHost を実装するには、使用するアドレスとポートを
208651a016b098f4fa1f6279559f104d70f1632dtakashi まず初めにサーバに通知しなければなりません。
208651a016b098f4fa1f6279559f104d70f1632dtakashi そして、その指定したアドレスとポートでの
208651a016b098f4fa1f6279559f104d70f1632dtakashi このバーチャルホストの挙動を設定するために、
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki <directive module="core" type="section">VirtualHost</directive>
208651a016b098f4fa1f6279559f104d70f1632dtakashi セクションを作ります。もし
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki <directive module="core" type="section">VirtualHost</directive>
208651a016b098f4fa1f6279559f104d70f1632dtakashi が listen していないアドレスとポートに対して
208651a016b098f4fa1f6279559f104d70f1632dtakashi それにはアクセスできないということに注意してください。</p>
52aeec76c8c60d34f2d0d069f3dd6412f2c49707yoshiki</manualpage>