Sun Java System Application Server Enterprise Edition 8.2 高可用性 (HA) 管理ガイド

Sun Java System Web Server の使用

Sun Java System Web Server では、ロードバランサプラグインをインストールすると、インストールプログラムによって必要な設定がすべて実行されます。手動での設定は必要ありません。

インストールプログラムは、Sun Java System Web Server の設定ファイルに次のエントリを追加します。

Web サーバーインスタンスの magnus.conf ファイルに、次のエントリを追加します。

##EE lb-pluginInit 
fn="load-modules"
shlib="web-server-install-dir/plugins/lbplugin/bin/libpassthrough.so" 
funcs="init-passthrough,service-passthrough,name-trans-passthrough" Thread="no"
Init fn="init-passthrough"
##end addition for EE lb-plugin

Web サーバーインスタンスの obj.conf ファイルに、次のエントリを追加します。

<Object name=default>
NameTrans fn="name-trans-passthrough" name="lbplugin" 
config-file="web-server-install-dir/web-server-instance/config/loadbalancer.xml"
<Object name="lbplugin">
  ObjectType fn="force-type" type="magnus-internal/lbplugin"
  PathCheck fn="deny-existence" path="*/WEB-INF/*"
  Service type="magnus-internal/lbplugin" 
  fn="service-passthrough"
  Error reason="Bad Gateway" 
  fn="send-error" 
  uri="$docroot/badgateway.html"
</object>

このコードでは、lbplugin は、Object を一意に識別する名前であり、web-server-install-dir /web-server-instance /config/loadbalancer.xml は、ロードバランサが動作するように設定されている仮想サーバーの XML 設定ファイルの場所です。

obj.conf ファイル内での NameTrans エントリの表示順序は非常に重要です。インストーラは NameTrans エントリを正しい場所に配置しますが、ユーザーが別の目的で obj.conf を編集している場合には、このエントリの順序を正しく保持する必要があります。特に、ロードバランサ情報は、document-root 関数の前に配置する必要があります。obj.conf ファイルの詳細については、『Sun Java System Web Server 7.0 Administrator’s Configuration File Reference 』を参照してください。

インストールが完了したら、「HTTP 負荷分散の設定」の説明に従ってロードバランサを設定します。