Integrating Tomcat with Apache Via the mod_jk Module
Subject:   Fixes that make it work
Date:   2002-12-18 23:31:01
From:   potel
OK, here's what you need to get this to work.

First, I'm on OS X 10.2.2, which comes preinstalled with Apache 1.3.27. I first followed the memo at
and got Tomcat to work standalone but could not get their webapp-style integration with Apache going.

An easier way to install Tomcat is go to and download that, currently 4.1.12. The result is a double-clickable Tomcat installer. Note this puts Tomcat in /Library/Tomcat not in /usr/local/jakarta-tomcat-4.x.x like the Apple instructions. It gives you start, stop, and restart commands, see their ReadMe. This version supposedly is ready to go with Apache 2 but use it anyway just for the easy Tomcat install.

Here are the necessary fixes to Chad's otherwise fine memo:

Get dlcompat from

There is no, so make your own from Chad's memo or use his copy from "available here" in paragraph 1 of Building mod_jk.

You shouldn't need to modify JAVA_HOME, but you need to modify DLCOMPAT_HOME to point to the dlcompat-yyyymmdd directory you downloaded.

In, the tomcat_home line need to point to where you installed Tomcat, for me:


Also, as someone else pointed out, the correct last line is:

The JkWorkersFile command is three separate lines. You need to point at your Tomcat directory, and there is no jk subdirectory under conf. Here are the correct lines (given my Tomcat location):

JkWorkersFile /Library/Tomcat/conf/

JkLogFile /Library/Tomcat/logs/mod_jk.log

JkLogLevel debug

Using ServerName will only work locally on your Mac, you need to change this to the Network Address shown in System Preferences under Sharing:

ServerName your-Network-Address

The VirtualHost command also has to be broken into separate lines. Use the same Network Address as above. You need to point to your Tomcat directory as before. And you need to use ajp13 throughout not ajp12. Here are the correct lines:

<VirtualHost your-Network Address>
DocumentRoot /Library/Tomcat/webapps
JkMount /*.jsp ajp13
JkMount /examples/servlet/* ajp13

That's it, have fun!

1 to 2 of 2
  1. Fixes that make it work *sortof*
    2003-04-24 22:13:32  anonymous2 [View]

  2. Fixes that make it work
    2002-12-24 21:28:41  spiffysj [View]

1 to 2 of 2