Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

mod_jk tomcat 4.1 with apache 1.3.27 on Redhat 7.2 box

Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I both Apache and Tomcat running as expected when I each of them separately, however I have some problems when I try to connect them.
The mod_jk is loaded correctly (as stated in the apache logs) but Apache insists of not talking to the tomcat app.
There are virtual hosts configure in the apache (which works fine with Resin btw)
I have the following lines in my httpd.conf
LoadModule jk_module libexec/
AddModule mod_jk.c
JkWorkersFile /tomcat/conf/
JkLogFile /apache/log/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

In addition I have the following added to each virtual host which I like to connect to Tomcat
<IfModule mod_jk.c>
JkMount /<Path to host root dir>/* worker1
I edit the /tomcat/conf/ file to point to the correspond host but still the jsp test file doesn't render correctly.
can anyone point to me what am I doing wrong ??
thanks in advance
Saloon Keeper
Posts: 22278
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off, you haven't defined "worker1". Most of the examples I've seen actually call this "ajp13" and define it in the, but you didn't list the, so we don't know if you did that right.
A typical (using worker name "ajp13" looks like this:
You didn't mention configuration of the Connector that will be listening on tcp/ip port 8009. If you don't set that up then tomcat can't hear the requests that Apache wants to forward to it.
Shraga van Shufel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I didn't include the settings from the file.
# Define 1 real worker using ajp13
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13<my virtual host>
thanks in advance for your help
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic