名前

Perlbal::Manual::WebServer - WebサーバとしてPerlbalを設定

バージョン

Perlbal 1.78.

説明

Perlbal Webサーバ サービスの設定の方法

最初に

Perlbalを設定するより良い説明としてまず the Perlbal::Manual::Configuration manpage を読んでください。このドキュメントはそれを読んだ後でもっと理解できるでしょう。

WebサーバとしてPerlbalを設定

デフォルトでは、Perlbalは設定ファイルを /etc/perlbal/perlbal.confで探します。

-c フラグを使って異なる設定ファイルを示すことができます。

    $ perlbal -c /home/user/perlbal.conf

/tmp の下にあるインデックスfアイルを提供する単純なwebサーバを設定する場合の簡単な例があります

    CREATE SERVICE perlbal_test
        SET role           = web_server
        SET listen         = 0.0.0.0:80
        SET docroot        = /tmp
    ENABLE perlbal_test

一行目は perlbal_test というサービスを作成します。最後の行はそのサービスを有効にします。

三つのパラメータは、順に、サービスは webサーバである、全てのアドレスのポート80でlistenする、ドキュメントルートは/tmpである、を宣言しています。

パラメータ

パラメータをどちらかの形式のコマンドで設定することができます:

    SET <service-name> <param> = <value>
    SET <param> = <value>
dirindexing = bool

HTTPリクエストがディレクトリのためのものの場合、ディレクトリのインデックスを表示します。警告: これは非同期操作ではありません。そのため高負荷のサイトではPerlbalを遅くするでしょう。

デフォルトはfalseです。

docroot = directory/root

webサーバのためのディレクトリルート

enable_concatenate_get = bool

Enable Perlbal's multiple-files-in-one-request mode, where a client have use a comma-separated list of files to return, always in text/plain.

Useful for web apps which have dozens/hundreds of tiny css/js files, and don't trust browsers/etc to do pipelining.

Decreases overall round-trip latency a bunch, but requires app to be modified to support it. 詳細は t/17-concat.t テストを見てください。

デフォルトはfalseです。

enable_md5 = bool

HTTP PUTリクエストのContent-MD5 ヘッダの検証を有効にします。

デフォルトは true です。

enable_delete = bool

HTTP DELETE リクエストを有効にします。

デフォルトはfalseです。

enable_put = bool

HTTP PUT リクエストを有効にします。

デフォルトはfalseです。

index_files = comma-separated list of filenames

Comma-separated list of filenames to load when a user visits a directory URL, listed in order of preference.

デフォルトは index.html です。

max_put_size = size

enable_put が on の場合に、PUTリクエストのために受け付ける最大 content-length。

デフォルトは0で、制限が無いことを意味します。

min_put_directory = int

PUT リクエストが有効な場合、これだけのレベルのディレクトリが既に存在していることを要求します。そうでなければ、失敗します。

デフォルトは0です。

server_tokens = bool

"Server" ヘッダを提供するかどうか。

Perlbalはデフォルトで全ての応答にヘッダを追加します(web_server roleの役割として)。このデフォルトを"off"に設定することで、Perlbalだと分かることを防ぐことができます。

デフォルトは on です。

参照

the Perlbal::Manual::Configuration manpage, the Perlbal::Manual::Management manpage.

TOP
inserted by FC2 system