From adc68dd01cf657cc25bae864d22a6d9f92fa84de Mon Sep 17 00:00:00 2001 From: Yoshiki Hayashi Date: Thu, 13 Jun 2002 07:46:30 +0000 Subject: [PATCH] New Japanese translations. Forward port from 1.3. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95640 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/vhosts/fd-limits.html | 73 ------- docs/manual/vhosts/fd-limits.html.ja.jis | 72 +++++++ docs/manual/vhosts/index.html | 84 -------- docs/manual/vhosts/index.html.ja.jis | 82 ++++++++ docs/manual/vhosts/name-based.html | 231 ---------------------- docs/manual/vhosts/name-based.html.ja.jis | 228 +++++++++++++++++++++ 6 files changed, 382 insertions(+), 388 deletions(-) delete mode 100644 docs/manual/vhosts/fd-limits.html create mode 100644 docs/manual/vhosts/fd-limits.html.ja.jis delete mode 100644 docs/manual/vhosts/index.html create mode 100644 docs/manual/vhosts/index.html.ja.jis delete mode 100644 docs/manual/vhosts/name-based.html create mode 100644 docs/manual/vhosts/name-based.html.ja.jis diff --git a/docs/manual/vhosts/fd-limits.html b/docs/manual/vhosts/fd-limits.html deleted file mode 100644 index dc09fb2d57..0000000000 --- a/docs/manual/vhosts/fd-limits.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - Apache Server Virtual Host Support - - - - - - -

File Descriptor Limits

- -

When using a large number of Virtual Hosts, Apache may run - out of available file descriptors (sometimes called file - handles if each Virtual Host specifies different log - files. The total number of file descriptors used by Apache is - one for each distinct error log file, one for every other log - file directive, plus 10-20 for internal use. Unix operating - systems limit the number of file descriptors that may be used - by a process; the limit is typically 64, and may usually be - increased up to a large hard-limit.

- -

Although Apache attempts to increase the limit as required, - this may not work if:

- -
    -
  1. Your system does not provide the setrlimit() system - call.
  2. - -
  3. The setrlimit(RLIMIT_NOFILE) call does not function on - your system (such as Solaris 2.3)
  4. - -
  5. The number of file descriptors required exceeds the hard - limit.
  6. - -
  7. Your system imposes other limits on file descriptors, - such as a limit on stdio streams only using file descriptors - below 256. (Solaris 2)
  8. -
- In the event of problems you can: - - - -

Please see the Descriptors and Apache - document containing further details about file descriptor - problems and how they can be solved on your operating - system.

- - - - diff --git a/docs/manual/vhosts/fd-limits.html.ja.jis b/docs/manual/vhosts/fd-limits.html.ja.jis new file mode 100644 index 0000000000..d6851d8582 --- /dev/null +++ b/docs/manual/vhosts/fd-limits.html.ja.jis @@ -0,0 +1,72 @@ + + + + + + Apache サーバのバーチャルホストのサポート + + + + + + + +

ファイル記述子の限界

+ +

たくさんのバーチャルホストを運用する場合、もし、 + 各バーチャルホストごとに異なるログファイルが指定してあると、 + Apache がファイル記述子 (ファイルハンドルとも呼ばれます) + を使い切ってしまうことがあります。Apache が使用するファイル + 記述子の数は、各エラーログファイルにつき 1 つ、他のログファイルの + ディレクティブにつき 1 つ、さらに内部で使用する 10 から 20、 + の合計になります。Unix オペレーティングシステムではプロセスごとに + 使用可能なファイル記述子の数を制限しています。たいていの場合は 64 で、 + 普通は大きな値のハードリミットまで増やすことができます。

+ +

Apache は必要に応じて上限を拡大しようと試みますが、 + 以下のような場合にはうまくいかないかもしれません。

+ +
    +
  1. 利用しているシステムで setrlimit() + システムコールが提供されていない。
  2. + +
  3. システム上で setrlimit(RLIMIT_NOFILE) が動作しない + (たとえば Solaris 2.3 のように)。
  4. + +
  5. 要求されるファイル記述子の数が + ハードリミットを超えてしまう。
  6. + +
  7. システムにファイル記述子に関して別の制限が存在してしまっている。 + たとえば、stdio ストリームではファイル記述子を 256 以上使えない + (Solaris 2)、など。
  8. +
+ 問題が発生した時に取り得る対処方法は次のとおり: + + + +

ファイル記述子の問題についての詳細や、 + オペレーティングシステムごとの解決方法については「ファイル記述子と + Apache」の文書を参照してください。 +

+ + + diff --git a/docs/manual/vhosts/index.html b/docs/manual/vhosts/index.html deleted file mode 100644 index 7cb19b8092..0000000000 --- a/docs/manual/vhosts/index.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - Apache Virtual Host documentation - - - - - - -

Apache Virtual Host documentation

- -

The term Virtual Host refers to the practice of - maintaining more than one server on one machine, as - differentiated by their apparent hostname. For example, it is - often desirable for companies sharing a web server to have - their own domains, with web servers accessible as - www.company1.com and - www.company2.com, without requiring the user to - know any extra path information.

- -

Apache was one of the first servers to support IP-based - virtual hosts right out of the box. Versions 1.1 and later of - Apache support both, IP-based and name-based virtual hosts - (vhosts). The latter variant of virtual hosts is sometimes also - called host-based or non-IP virtual hosts.

- -

Below is a list of documentation pages which explain all - details of virtual host support in Apache version 1.3 and - later.

-
- -

Virtual Host Support

- - - -

Configuration directives

- - - -

Folks trying to debug their virtual host configuration may - find the Apache -t -D DUMP_VHOSTS command line switch - useful. It will dump out a description of how Apache parsed the - configuration file. Careful examination of the IP addresses and - server names may help uncover configuration mistakes. - -

- - - diff --git a/docs/manual/vhosts/index.html.ja.jis b/docs/manual/vhosts/index.html.ja.jis new file mode 100644 index 0000000000..7900a8e4a2 --- /dev/null +++ b/docs/manual/vhosts/index.html.ja.jis @@ -0,0 +1,82 @@ + + + + + + Apache バーチャルホスト説明書 + + + + + + + +

Apache バーチャルホスト説明書

+ +

バーチャルホストという用語は、1 台のマシン上で + 一つ以上のサーバを、 + それぞれ別の違うホスト名で見せる運用方法のことを指します。 + たとえば、一つのサーバを共有する複数の会社が、 + ユーザに余計なパス名を要求せずに、www.company1.com + や www.company2.com といったそれぞれに固有の + ドメイン名でウェブサーバにアクセスできるようにしたい、 + といったことはしばしばあります。

+ +

Apache は、特に手を入れない状態で IP ベースのバーチャルホスト + をサポートした最初のサーバの一つです。バージョン 1.1 以降の Apache + では、IP ベースとネームベースのバーチャルホストの両方をサポート + しています。ネームベースのバーチャルホストは、ホストベースあるいは非 + IP ベースのバーチャルホストと呼ばれることもあります。

+ +

以下のページでは、Apache バージョン 1.3 + 以降でのバーチャルホストのサポートについての詳細を説明します。

+ +
+ +

バーチャルホストのサポート

+ + + +

設定ディレクティブ

+ + + + +

バーチャルホストの設定のデバッグをするには + Apache のコマンドラインスイッチ -t -D DUMP_VHOSTS が便利です。 + Apache が設定ファイルをどう解析したかについて出力します。 + IP アドレスとサーバ名を注意深く調べれば、 + 設定の間違いを見つける助けになるでしょう。

+ + + diff --git a/docs/manual/vhosts/name-based.html b/docs/manual/vhosts/name-based.html deleted file mode 100644 index 075140a6bf..0000000000 --- a/docs/manual/vhosts/name-based.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Name-based Virtual Hosts - - - - - - -

Name-based Virtual Host Support

- -

This document describes when and how to use name-based virtual hosts.

- - - -

See also: Virtual Host examples for common -setups, IP-based Virtual Host Support, -An In-Depth Discussion of Virtual Host -Matching, and Dynamically configured mass -virtual hosting.

- -
- -

Name-based vs. IP-based Virtual Hosts

- -

IP-based virtual hosts use the IP address of the connection to -determine the correct virtual host to serve. Therefore you need to -have a separate IP address for each host. With name-based virtual -hosting, the server relies on the client to report the hostname as -part of the HTTP headers. Using this technique, many different hosts -can share the same IP address.

- -

Name-based virtual hosting is usually simpler, since you need -only configure your DNS server to map each hostname to the correct -IP address and then configure the Apache HTTP Server to recognize -the different hostnames. Name-based virtual hosting also eases -the demand for scarce IP addresses. Therefore you should use -name-based virtual hosting unless there is a specific reason to -choose IP-based virtual hosting. Some reasons why you might consider -using IP-based virtual hosting:

- - - -

Using Name-based Virtual Hosts

- - -
-Related Directives

- -DocumentRoot
-NameVirtualHost
-ServerAlias
-ServerName
-ServerPath
-VirtualHost
-
- -

To use name-based virtual hosting, you must designate the IP -address (and possibly port) on the server that will be accepting -requests for the hosts. This is configured using the NameVirtualHost directive. -In the normal case where any and all IP addresses on the server should -be used, you can use * as the argument to -NameVirtualHost. Note that mentioning an IP address in a -NameVirtualHost directive does not automatically make the -server listen to that IP address. See Setting -which addresses and ports Apache uses for more details. In addition, -any IP address specified here must be associated with a network interface -on the server.

- -

The next step is to create a <VirtualHost> block for -each different host that you would like to serve. The argument to the -<VirtualHost> directive should be the same as the -argument to the NameVirtualHost directive (ie, an IP -address, or * for all addresses). Inside each -<VirtualHost> block, you will need at minimum a ServerName directive to -designate which host is served and a DocumentRoot directive to -show where in the filesystem the content for that host lives.

- -

For example, suppose that both www.domain.tld and -www.otherdomain.tld point at an IP address -that the server is listening to. Then you simply add the following -to httpd.conf:

- -
-    NameVirtualHost *
-
-    <VirtualHost *>
-    ServerName www.domain.tld
-    DocumentRoot /www/domain
-    </VirtualHost>
-
-    <VirtualHost *>
-    ServerName www.otherdomain.tld
-    DocumentRoot /www/otherdomain
-    </VirtualHost>
-
- -

You can alternatively specify an explicit IP address in place of -the * in both the NameVirtualHost and -<VirtualHost> directives.

- -

Many servers want to be accessible by more than one name. This is -possible with the ServerAlias -directive, placed inside the <VirtualHost> section. For -example if you add this to the first <VirtualHost> block -above

- -
-ServerAlias domain.tld *.domain.tld -
- -

then requests for all hosts in the domain.tld domain -will be served by the www.domain.tld virtual host. The -wildcard characters * and ? can be used to match names. Of course, -you can't just make up names and place them in ServerName -or ServerAlias. You must first have your DNS server -properly configured to map those names to an IP address associated -with your server.

- -

Finally, you can fine-tune the configuration of the virtual hosts -by placing other directives inside the -<VirtualHost> containers. Most directives can be -placed in these containers and will then change the configuration only -of the relevant virtual host. To find out if a particular directive -is allowed, check the Context of the -directive. Configuration directives set in the main server -context (outside any <VirtualHost> container) -will be used only if they are not overriden by the virtual host -settings.

- -

Now when a request arrives, the server will first check if it is -using an IP address that matches the NameVirtualHost. If -it is, then it will look at each <VirtualHost> -section with a matching IP address and try to find one where the -ServerName or ServerAlias matches the -requested hostname. If it finds one, then it uses the configuration -for that server. If no matching virtual host is found, then -the first listed virtual host that matches the IP -address will be used.

- -

As a consequence, the first listed virtual host is the -default virtual host. The DocumentRoot from the -main server will never be used when an IP -address matches the NameVirtualHost directive. If you -would like to have a special configuration for requests that do not -match any particular virtual host, simply put that configuration in a -<VirtualHost> container and list it first in the -configuration file.

- -

Compatibility with Older Browsers

- -

As mentioned earlier, there are some clients - who do not send the required data for the name-based virtual - hosts to work properly. These clients will always be sent the - pages from the first virtual host listed for that IP address - (the primary name-based virtual host).

- -

There is a possible workaround with the ServerPath - directive, albeit a slightly cumbersome one:

- -

Example configuration:

-
-    NameVirtualHost 111.22.33.44
-
-    <VirtualHost 111.22.33.44>
-    ServerName www.domain.tld
-    ServerPath /domain
-    DocumentRoot /web/domain
-    </VirtualHost>
-
- -

What does this mean? It means that a request for any URI - beginning with "/domain" will be served from the - virtual host www.domain.tld This means that the - pages can be accessed as - http://www.domain.tld/domain/ for all clients, - although clients sending a Host: header can also - access it as http://www.domain.tld/.

- -

In order to make this work, put a link on your primary - virtual host's page to - http://www.domain.tld/domain/ Then, in the virtual - host's pages, be sure to use either purely relative links - (e.g., "file.html" or - "../icons/image.gif" or links containing the - prefacing /domain/ (e.g., - "http://www.domain.tld/domain/misc/file.html" or - "/domain/misc/file.html").

- -

This requires a bit of discipline, but adherence to these - guidelines will, for the most part, ensure that your pages will - work with all browsers, new and old.

- -

See also: ServerPath - configuration example

- - - - diff --git a/docs/manual/vhosts/name-based.html.ja.jis b/docs/manual/vhosts/name-based.html.ja.jis new file mode 100644 index 0000000000..b9f169bbbc --- /dev/null +++ b/docs/manual/vhosts/name-based.html.ja.jis @@ -0,0 +1,228 @@ + + + + + 名前ベースのバーチャルホスト + + + + + + +

この文書では名前ベースのバーチャルホストをどんなとき、 + またどうやって使うのかということを説明します。

+ + + +

参考: 標準的なセットアップでの + バーチャルホストの例IP ベースの + バーチャルホストのサポート + バーチャルホストのマッチングの具体的な詳細大量のバーチャルホストを動的に設定する +

+
+ +

名前ベースと IP ベースのバーチャルホストの比較

+ +

初期のバージョンの HTTP では (他の多くのプロトコル、例えば FTP + と同様) 一つのサーバ上でのバーチャルホストごとに異なった IP + アドレスが必要でした。いくつかのプラットフォームでは、このことが + 実行可能なバーチャルホストの数を限定してしまうことになりました。 + また、IP アドレスの数には限りがあるということについての懸念から、 + レジストラ (ARIN, RIPE, APNIC) はバーチャルホストごとに + IP を割り当てるようなことは避けるよう強く要請しています。

+ +

名前ベースのバーチャルホストは通常単純で、それぞれのホスト名と + それに対応する正確な IP アドレスを DNS で設定し、異なる + ホスト名を区別出来るように Apache HTTP サーバを設定するだけです。 + さらに、名前ベースのバーチャルホストは不足する IP + アドレスの需要を緩和します。したがって、IP ベースのバーチャルホストを + 選択すべき特定の理由がなければ名前ベースのバーチャルホストを使うべきです。 + IP ベースのバーチャルホストを使用することを考慮する理由として、

+ + + +

名前ベースのバーチャルホストを利用する

+ + + + + +
関連ディレクティブ
+
+ DocumentRoot
+ NameVirtualHost
+ ServerAlias
+ ServerName
+ ServerPath
+ VirtualHost
+
+ +

名前ベースのバーチャルホストを使うには、そのホストへの + リクエストを受け付けるサーバの IP アドレス (もしかしたらポートも) + を指定する必要があります。 + これは NameVirtualHost + ディレクティブで設定します。通常、NameVirtualHost で + * の属性を使ってサーバの全ての IP アドレスを使います。 + NameVirtualHost ディレクティブで IP アドレスを書いても、 + 自動的にサーバがその IP アドレスをリッスンするということはないことに + 注意してください。詳細は Apache の使うアドレスと + ポートを設定する を読んでください。さらに、ここで指定された + IP アドレスは全てサーバのネットワークインターフェースと関連付けられて + いなければなりません。

+ +

次は、扱いたいそれぞれのホストに対して <VirtualHost> ブロックを + 作成してください。<VirtualHost> ディレクティブの + 引数は NameVirtualHost ディレクティブの引数と + 同じにしてください (すなわち、IP アドレス一つや全てのアドレスのための + *)。それぞれの <VirtualHost> ディレクティブ + の中には、最低限、どのホストが扱われるかを示す ServerName ディレクティブと、 + そのホスト用のコンテンツがファイルシステム上のどこにあるかを示す + DocumentRoot ディレクティブを + 書く必要があります。

+ +

たとえば、www.domain.tld と + www.otherdomain.tld の両方が 1つの IP + アドレスを指しているとしましょう。そのような場合は、 + httpd.conf に以下のようなコードを追加するだけです

+
+    NameVirtualHost *
+
+    <VirtualHost *>
+    ServerName www.domain.tld
+    DocumentRoot /www/domain
+    </VirtualHost>
+
+    <VirtualHost *>
+    ServerName www.otherdomain.tld
+    DocumentRoot /www/otherdomain
+    </VirtualHost>
+
+ +

NameVirtualHost 及び + <VirtualHost> のどちらの場合も、 + * の部分には明示的に IP アドレスを指定することができます。

+ +

複数の名前でサーバアクセスができるようにしたいことも多いでしょう。 + このようなことは、ServerAlias ディレクティブを <VirtualHost> + セクションに記述することで実現できます。 + 例えばこれを最初の <VirtualHost> ブロックに書き加えると、

+
+    ServerAlias domain.tld *.domain.tld
+
+ +

domain.tld ドメインへの全てのホストへのリクエストは + www.domain.tld のバーチャルホストが処理します。 + * や ? をワイルドカード文字として使用できます。 + Of course,you can't just make up names and place them in ServerName + or ServerAlias. + 第一に DNS のホスト名と IP アドレスをサーバにあわせて適切に設定する事が必要です

+ +

最後に、<VirtualHost> コンテナの中に + 他のディレクティブを書くことで、バーチャルホストの設定を細かく変更 + することができます。どのディレクティブを書くことができるかは、 + ディレクティブの コンテキスト を + 調べてください。主サーバコンテキスト + (<VirtualHost> コンテナの外) の + 設定用ディレクティブはバーチャルホストでの設定で上書きされていない + ときのみ使用されます。

+ +

リクエストが来ると、サーバはまず最初に NameVirtualHost + にマッチする IP アドレスかどうかをチェックします。マッチすれば + マッチした IP アドレスの <VirtualHost> + のそれぞれのセクションの中から ServerName か + ServerAlias に要求されたホスト名があるか探します。 + 見つかればそのサーバ用の設定を使います。マッチするバーチャルホスト + が見つからなければ、マッチした IP アドレスの + リストの最初にあるバーチャルホスト が使われます。

+ +

結果として、リストの最初のバーチャルホストが デフォルト の + バーチャルホストになります。IP アドレスが NameVirtualHost + ディレクティブにマッチした場合は、メインのサーバ の + DocumentRoot 使われ ません + どのバーチャルホストにもマッチしないリクエストに対して、 + 特別な設定をしたいのであれば、設定ファイル中の最初の + <VirtualHost> にそれを記述してください。

+ +

古いブラウザとの互換性

+ +

上で書いたように、名前ベースのバーチャルホストが正しく動作する + ために必要な情報を送ってこないクライアントが依然として存在しています。 + そのようなクライアントに対しては、該当する IP アドレスについて、 + 一番最初に設定されているバーチャルホスト + (プライマリの名前ベースのバーチャルホスト) + からページが送り返されます。

+ +

ServerPath + ディレクティブで対処が可能です。ちょっと不格好ですけれども。

+ +

設定例

+
+    NameVirtualHost 111.22.33.44
+
+    <VirtualHost 111.22.33.44>
+    ServerName www.domain.tld
+    ServerPath /domain
+    DocumentRoot /web/domain
+    </VirtualHost>
+
+ +

この例にはどういう意味があるでしょうか? これは + "/domain" で始まる URI へのリクエストはすべて、 + バーチャルホスト www.domain.tld で処理される、 + という意味です。つまり、すべてのクライアントで + http://www.domain.tld/domain/ でアクセスできるページが、 + Host: ヘッダを送ってくるクライアントであれば + http://www.domain.tld/ としてもアクセスできる、 + という意味です。

+ +

これを実用的なものとするためには、 + プライマリのバーチャルホストのページに + http://www.domain.tld/domain/ へのリンクを設置します。 + そして、バーチャルホストのページでは、純粋な相対リンク (例: + "file.html" や "../icons/image.gif")、 + あるいは /domain/ で始まるリンク (例: + "http://www.domain.tld/domain/misc/file.html" や + "/domain/misc/file.html") だけを設置します。

+ +

これには、幾分かの規律が必要となりますが、 + このようなガイドラインを忠実に守ることにより、たいていの場合、 + すべてのブラウザで ― 新しいブラウザでも古いものでも ― + 作成したページが見えるということを保証します。

+ +

参考: ServerPath 設定例

+ + + -- 2.50.1