yes, you should install libapache-mod-jk. that's going to add the jk module into the apache modules directory. However, when I set this up I still had a fair amount of work to do. One of the tough parts was getting java installed, I went with blackdown j2sdk1.4. Make sure you export your JAVA_HOME variable and then these are the basic steps I followed... You'll of course want to adapt things to your specific needs/environment but these notes come from a debian install...
* apt-get install tomcat4
* apt-get install libapache-mod-jk
* create file /etc/apache/conf.d/mod_jk.conf with these contents:
Load mod_jk module
LoadModule jk_module /usr/lib/apache/1.3/mod_jk.so
# Declare the module for <IfModule directive>
AddModule mod_jk.c
# Where to find workers.properties
JkWorkersFile /etc/libapache-mod-jk/workers.properties
# Where to put jk logs
JkLogFile /var/log/apache/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 servlet for context /examples to worker named worker1
JkMount /examples/servlet/* local
# Send JSPs for context /examples to worker named worker1
JkMount /examples/*.jsp local
# Special directive provided by mod_jk that tells Apache to
# forward requests (maybe only JSP requests, I'm not sure) in
# these directories to Tomcat.ajp13 is the protocol used to
# talk to Tomcat.
JkMount /struts-examples/* local
* modify /etc/libapache-mod-jk/workers.properties to create a worker called local as in the following:
# Tomcat and Java configuration
#
workers.tomcat_home=/usr/share/tomcat4
workers.java_home=/usr/lib/j2se/1.4
ps=/
worker.list=local
# Definition for local worker using AJP 1.3
#
worker.local.type=ajp13
worker.local.host=localhost
worker.local.port=8009
* check /etc/tomcat4/server.xml and make sure the ajp13 connector is uncommented
* run apachectl configtest and make sure it looks ok
* restart tomcat first so apache will be able to bind to the process: /etc/init.d/tomcat4 restart
* restart apache: apachectl restart
Last edited by jandersen78; 09-27-2004 at 11:01 PM.
|