mod_jk

mod_jk

複数のtomcatと連携をとる設定

workers.properties

worker.list=jkstatus,tomcat41,tomcat55

worker.tomcat41.type=ajp13
worker.tomcat41.host=localhost
worker.tomcat41.port=8009
worker.tomcat55.type=ajp13
worker.tomcat55.host=localhost
worker.tomcat55.port=18009

worker.jkstatus.type=status

jk.conf

<IfModule mod_jk.c>
    # Where to find workers.properties
    JkWorkersFile /etc/apache2/workers.properties

    # Where to put jk logs
    JkLogFile     /var/log/apache2/mod_jk.log

    # Set the jk log level [debug/error/info]
    JkLogLevel    warn

    # Select the log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

    # JkOptions indicate to send SSL KEY SIZE,
    JkOptions     +ForwardKeySize +ForwardURICompat +ForwardDirectories

    # JkRequestLogFormat set the request format
    JkRequestLogFormat     "%w %V %T"

    # Send JSPs for context / to worker named ajp13
#    JkMount /*/*Servlet ajp13
#    JkMount /*.jsp ajp13

    # mod_jk
    JkMount /jkstatus      jkstatus

    # tomcat41 webapps
    JkMount /tomcat41app/* tomcat41

    # tomcat55 webapps
    JkMount /tomcat55app/* tomcat55
</IfModule>

server.xml

  • この記述が有効になっているか確認。
       <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
                  port="8009" minProcessors="5" maxProcessors="75"
                  acceptCount="10" debug="0"/>

  • tomcat4系の場合こちらが有効になっているかも。こちらはコメントアウト。
       <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                  port="8009" minProcessors="5" maxProcessors="75"
                  enableLookups="true" redirectPort="8443"
                  acceptCount="10" debug="0" connectionTimeout="0"
                  useURIValidationHack="false"
                  protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
       <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
                 debug="0"/>
       <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
                 debug="0"/>
2007-06-20 (水) 16:41:54 (4409d)

リロード   新規 編集 凍結 差分 添付 複製 名前変更   ホーム 一覧 単語検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS