#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Washington DC, USA
    Posts
    156
    Rep Power
    14

    Apache 1.3 + Tomcat 4.1 + connector?


    I'm trying to build Apache with mod_jk built in to the httpd binary. I've downloaded and installed the binary version of Tomcat 4.1.x and have my Apache source tree waiting for the Tomcat connector to patch it.

    I downloaded jakarta-tomcat-connectors-jk-1.2.3-src.tar.gz but I'm a little stuck on exactly what to do from here. Is this even the right component I need to hook Apache and Tomcat together? I tried building it with Ant and got some errors that Coyote files were missing:

    Code:
    [root@vanadium jk]# /usr/local/ant/bin/ant 
    Buildfile: build.xml
    
    detect:
         [echo] -------- jakarta-tomcat-connectors --------
    
    prepare:
        [mkdir] Created dir: /usr/local/src/java/jakarta-tomcat-connectors-jk-1.2.3-src/jk/build
        [mkdir] Created dir: /usr/local/src/java/jakarta-tomcat-connectors-jk-1.2.3-src/jk/build/conf
        [mkdir] Created dir: /usr/local/src/java/jakarta-tomcat-connectors-jk-1.2.3-src/jk/build/classes
        [mkdir] Created dir: /usr/local/src/java/jakarta-tomcat-connectors-jk-1.2.3-src/jk/build/classes/META-INF
        [mkdir] Created dir: /usr/local/src/java/jakarta-tomcat-connectors-jk-1.2.3-src/jk/build/lib
         [copy] Copying 8 files to /usr/local/src/java/jakarta-tomcat-connectors-jk-1.2.3-src/jk/build/conf
    
    BUILD FAILED
    file:/usr/local/src/java/jakarta-tomcat-connectors-jk-1.2.3-src/jk/build.xml:143: Warning: Could not find file /usr/local/src/java/jakarta-tomcat-connectors-jk-1.2.3-src/coyote/build/lib/tomcat-coyote.jar to copy.
    Tomcat already has what I understand to be Coyote running at port 8009, but I'm not sure exactly what I should be using with Apache to get this working. Can anyone please help? Thanks!


    -Cliff
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Washington DC, USA
    Posts
    156
    Rep Power
    14

    update


    I was able to find documentation on how to link mod_jk (v1.2.3) into the Apache binary. I compiled a new stripped down apache with mod_jk alone and it runs.

    However, there is reference to the worker.properties file, yet it only exists currently in the mod_jk source tree. Apparently this file needs to be configured properly for Tomcat to work. Anyone have the next step for me? Thank you!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Washington DC, USA
    Posts
    156
    Rep Power
    14

    Got it!


    I had to put a simple workers.properties file in my $CATALINA_HOME/conf directory:

    Code:
    workers.tomcat_home="/usr/local/tomcat"
    workers.java_home="/usr/local/javasdk"
    worker.list=test
    worker.test.port=8009
    worker.test.host=localhost
    worker.test.type=ajp13
    Although this connector was already created in the $CATALINA_HOME/conf/server.xml file (you'll see a connector tag in there that hasn't been commented out), I believe this is crucial so that Apache knows how to refer to the connector.

    Here's the code in the httpd.conf file:

    Code:
    JkWorkersFile "/usr/local/tomcat/conf/workers.properties"
    JkMount /examples/* test
    JkMount /tomcat-docs/* test
    JkLogFile "/usr/local/apache-tomcat/logs/mod_jk.log"
    JkLogLevel info

    Hope this helps someone!

IMN logo majestic logo threadwatch logo seochat tools logo