■パッケージのインストール
|
debian # apt-get install libapache2-mod-jk2
|
■デフォルトコンフィグファイルのコピー
以下のコマンドで、workerファイルをコピーしてくる
|
debian # cd /usr/share/doc/libapache2-mod-jk2/examples
debian # cp workers2.properties
/etc/apache2/ |
■コンフィグファイルの指定
/etc/apache2/mods-enabled/jk2.conf の4行目をアンコメントアウト
|
# To enable mod_jk2, customize workers2.properties* from
# /usr/share/doc/libapache2-mod-jk2/examples and copy it to
# /etc/apache2/workers2.properties. Then uncomment the following line:
JkSet config.file /etc/apache2/workers2.properties
|
■リクエストを Apache2 から Tomcat4 へ飛ばす
http://hostname/URL にアクセスした時に
Tomcat4 のhttp://hostname:8180/URL へリクエストを飛ばすには
workers2.properties に以下の様に追加します。
例:
http://hostname:8180/manager を http://hostname/manager に飛ばす
■アプリケーションの再起動
|
debian # /etc/init.d/apache2 restart |
workers2.properties に変更を加えただけの時には tomcat4 の再起動は不要です。
|