Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 mod_jk.so 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/mod_jk.so

<IfModule jk_module>
        JkWorkersFile conf/workers.properties

        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
 </IfModule>

and created workers.properties which contains:

worker.list=worker1

# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8165

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 : http://pastie.org/2766089

anyone see what i've done wrong?

share|improve this question

migrated from stackoverflow.com 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/workers.properties" suggest that tomcat config workers.properties 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 –  techventure Nov 1 '11 at 23:53

1 Answer 1

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/workers.properties... I modified the entries in httpd.conf as:

LoadModule    jk_module  c:/apache-5.5/modules/mod_jk.so
JkWorkersFile c:/apache-5.5/conf/workers.properties
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.

Cheers.

share|improve this answer

Your Answer

 
discard

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.