Yesterday I try it again and WoooLa success.... , so i want to share and write
it as my memo..
Before begin i suggest that you already familiar with FreeBSD alittle at least
you should able to install program such as Apache, Tomcat, and JK from ports.
So, in this howto you should already installed Apache2.2, Tomcat5.5 and mod_jk
already, then I will write only howto config the things work.
How to
In configuration file of Apache you have to uncomment the line that load mod_jk
/usr/local/etc/apache22/httpd.conf
LoadModule jk_module libexec/apache22/mod_jk.so # un comment this line
and then you have to told Apache to know that where it can find the configuration of
mod_jk by add a line that include mod_jk.conf at the last line of httpd.conf
Include /usr/local/tomcat5.5/conf/jk/mod_jk.conf
then.... where is mod_jk.conf ??
mod_jk.conf and worker.properties are the configuration file for mod_jk that after
you installed mod_jk the files appear in /usr/local/etc/apache22/ as a sample file
mod_jk.conf.sample and worker.properties.sample then you should copy and rename
it to /usr/local/tomcat5.5/conf/jk/mod_jk.conf and worker.properties.
In mod_jk.config
# Replace jsp-hostname with the hostname of your JSP server, as
# specified in workers.properties.
#
JkWorkersFile /usr/local/tomcat5.5/conf/jk/workers.properties
JkLogFile /var/log/jk.log
JkShmFile /var/log/jk-runtime-status
JkLogLevel error
# Sample JkMounts. Replace these with the paths you would
# like to mount from your JSP server.
JkMount /*.jsp jsp-hostname
JkMount /servlet/* jsp-hostname
JkMount /examples/* jsp-hostname
======
in workers.properties
# Incredibly simple workers.properties file, intended for connecting
# to one host, via AJP13. See the tomcat documentation for
# information on more exotic configuration options.
#
# Change jsp-hostname to the hostname of your JSP server.
#
worker.list=jsp-hostname
worker.jsp-hostname.port=8009
worker.jsp-hostname.host=jsp-hostname
worker.jsp-hostname.type=ajp13
worker.jsp-hostname.lbfactor=1
in workers.properties and mod_jk.conf change jsp-hostname to your hostname
for example change it to localhost
restart apache and tomcat then test it.
it should work properly now.