Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to integrate tomcat 5.5 and apache 2.2.3 on windows xP (have to use it) . I've download the latest and placed in into modules folder of apache.

Following additions/changes were made to httpd.conf :

ServerName localhost:8160
Listen 8160 

#load module
LoadModule jk_module modules/

<IfModule jk_module>
        JkWorkersFile conf/

        JkLogFile logs/mod_jk.log

        JkLogLevel debug

        JkShmFile logs/mod_jk.shm

        JkWatchdogInterval 60

        JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

        JkMount /jsp-examples/*.jsp worker1

        JkMount /servlets-examples/* worker1

and created which contains:


# Set properties for worker1 (ajp13)

in tomcat server.xml :

<Connector port="8165" maxHttpHeaderSize="8192"
           maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
           enableLookups="false" redirectPort="8443" acceptCount="100"
           connectionTimeout="20000" disableUploadTimeout="true" />

To begin i was trying to load the default webapps that ship with tomcat 5.5. http://localhost:8165/servlets-examples/ works fine , localhost:8160 shows "It works!" but trying 'http://localhost:8160/servlets-examples/' gives me a long wait and then

 Bad Gateway

 The proxy server received an invalid response from an upstream server.

trying http://localhost:8160/jsp-examples gives:

 The requested URL /jsp-examples was not found on this server.

Here's the link to mod_jk.log :

anyone see what i've done wrong?

share|improve this question

migrated from Oct 29 '11 at 14:03

This question came from our site for professional and enthusiast programmers.

Do you really want to use mod_jk? It's only really worth the hassle for very high volume sites. Most of the time mod_proxy is fine, and much easier to configure. – skaffman Oct 27 '11 at 6:59
i realize it's tedious to configure but i have to use be using mod_jk to keep as close as possible to a production environment that uses mod_jk. – techventure Oct 27 '11 at 8:35
What might go wrong is the path linking files in windows system. For example, "JkWorkersFile conf/" suggest that tomcat config is under the same folder of your apache config folder which is a bit strange, unless you declare alias somewhere. If you copy the config from a linux box to windows, you may want to double check that. – Will Oct 28 '11 at 1:38
The problem was that i needed to include the full path for the JKWorkersFile. that seems to have done the trick. Thank you all – John Younan Nov 1 '11 at 23:53
up vote 1 down vote accepted

based on the comments and further research, i needed to include the full path to the JkWorkersFile and other JK* entries. so instead of having JkWorkersFile conf/ I modified the entries in httpd.conf as:

LoadModule    jk_module  c:/apache-5.5/modules/
JkWorkersFile c:/apache-5.5/conf/
JkShmFile     c:/apache-5.5/logs/mod_jk.shm
JkLogFile     c:/apache-5.5/logs/mod_jk.log
JkLogLevel debug

and that seems to have done the trick.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.