MOD_JK2 is really bad.
After a few days of MOD_JK2, the Apache2 Tomcat5 was easily set with mod_jk.so.
Although apache.org also said that it is not recommended to use the spit with a spit with MOD_JK2.SO. But the default configuration file for mod_jk2.so given in the latest Tomcat: workers2.properties. Don't be confused by it.
It is recommended that you don't have to pay attention to this document, still use MOD_JK.SO's workers.properties. If you don't want to write a configuration file from your head, you can find it from the old Tomcat. Or you can find it at the official website http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/jk/quickhowto.html.
Httpd.conf Add to the following lines:
# Loading mod_jk module
# Update this path to match your modules location
LoadModule JK_Module Libexec / MOD_JK.SO
# Declare the module for
AddModule MOD_JK.C
# Where to find workers.properties
# Update this path to match your conf Directory location (put worctory location "next to httpd.conf)
JKWorkersFile Conf / Workers.properties
# WHERE to PUT JK LOGS
# Update this path to match your logs directory location (put mode_jk.log next to access_log)
Jklogfile /var/log/httpd/mod_jk.log
# Set the jk log level [debug / error / info]
JKLoglevel Info
# 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 everything for context / examples to worker named worker1 (ajp13)
JKMount / Examples / * Worker1
Workers.properties:
# Define 1 real worker using ajp13
Worker.list = worker1
# Set Properties for Worker1 (AJP13)
Worker.Worker1.Type = ajp13
Worker.worker1.host = localhost
Worker.Worker1.port = 8009
Worker.Worker1.lbFactor = 50
Worker.Worker1.cachesize = 10
Worker.Worker1.cache_timeout = 600
Worker.worker1.socket_keepalive = 1
Worker.worker1.socket_timeout = 300