Problem installing mod_jk on Ubuntu karmic apache httpd 2.2.12 and tomcat 6
- by Deny Prasetyo
I have a problem when configuring mod_jk on ubuntu
i use apache httpd 2.2.12 and tomcat 6
I installed apache httpd and lib mod_jk from synaptic and use default configuration.
Here my mod_jk.conf
Load mod_jk module
Update this path to match your modules location
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
Where to find workers.properties
Update this path to match your conf directory location
JkWorkersFile /etc/apache2/workers.properties
Where to put jk logs
Update this path to match your logs directory location
JkLogFile /etc/apache2/logs/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 /ws to worker ajp13
JkMount /themark ajp13
JkMount /themark/* ajp13
Send everything for context /jsp-examples to worker ajp13
JkMount /static ajp13
JkMount /static/* ajp13
Send everything for context /servelts-examples to worker ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
and this my workers.properties
Define 1 real worker named ajp13
worker.list=ajp13
Set properties for worker named ajp13 to use ajp13 protocol,
and run on port 8009
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
worker.ajp13.lbfactor=50
worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300
when i start apache httpd and tomcat 6. it seem that mod_jk load successfully and tomcat 6 recognized the ajp connector.
here my tomcat 6 log
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 29, 2010 11:48:34 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 29, 2010 11:48:34 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
here my mod_jk.log
[Mon Mar 29 11:06:53 2010][6688:3499775792] [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized
[Mon Mar 29 11:16:59 2010][18277:1983043376] [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized
[Mon Mar 29 11:16:59 2010][18278:1983043376] [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized
but when i access http://localhost/themark it won't work.
it seems that apache httpd can load the mod_jk module but it can listen the ajp.
is there somebody ever had same problem?
nb: i use the same config in windows using xampplite and it works well