Mod jk

From skinetwork

Jump to: navigation, search

[edit] Integrating tomcat and apache using mod_jk module

  1. Get mod_jk.so source

wget http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.21/tomcat-connectors-1.2.21-src.tar.gz

  1. cd native; ./configure; and make

./configure --with-apxs=/usr/sbin/apxs --with-java-home=${JAVA_HOME} --with-java-platform=2 -enable-jni

  1. copy mod_jk.so from apache2 directory to the httpd modules directory httpd/modules

http://tomcat.apache.org/connectors-doc-archive/jk2/jk2/installhowto.html


LoadModule jk_module modules/mod_jk.so
# AddModule mod_jk.c :: This is used in apache versions less than 1.3
JkWorkersFile /etc/tomcat5/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel error
# 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 servlet for context /examples to worker named worker1
JkMount /examples/servlet/* ajp12

# Send JSPs for context /examples to worker named worker1
JkMount /examples/*.jsp ajp12


YET TO FINISH THIS ARTICLE ----------------
Personal tools