Integrating Apache 2.0.54 with Tomcat 5.5.9 on Fedora Core 4

Table of Contents

Overview

This technical note covers integrating Apache 2.0.54 with Tomcat 5.5.9 on Fedora Core 4.

Steps

See http://jakarta.apache.org/tomcat/connectors-doc/howto/apache.html. More detail is needed so here it is.

  1. as root run 'yum list mod_jk' and you should see to packages.
  2. as root run 'yum install package1 package2'. Substituing package1 and package2 for the real package names. This action will install mod_jk. mod_jk.so will now be in /etc/httpd/modules/
  3. In the section 'Using Tomcat auto-configure' in http://jakarta.apache.org/tomcat/connectors-doc/howto/apache.html configure the tomcat ${YOUR_TOMCAT_HOME}/conf/server.xml first. Then restart tomcat and this will create ${YOUR_TOMCAT_HOME}/conf/auto/mod_jk.conf and a ${YOUR_TOMCAT_HOME}/conf/jk/ . This is different than documented in the apache-tomcat web page.
  4. Copy the newly created mod_jk.conf to /etc/httpd/conf.d/ (You now do not need to edit /etc/httpd/conf/httpd.conf)
  5. Copy ${YOUR_TOMCAT_HOME}/conf/workers.properties to /etc/httpd/conf/
  6. Back out your changes to ${YOUR_TOMCAT_HOME}/conf/server.xml
  7. Edit ${YOUR_TOMCAT_HOME}/conf/auto/mod_jk.conf to reflect the following:
########## Auto generated on Thu Sep 22 18:58:31 CDT 2005##########

<IfModule !mod_jk.c>
  LoadModule jk_module "/etc/httpd/modules/mod_jk.so"
</IfModule>


#<VirtualHost localhost>
#    ServerName localhost

    # Where to find workers.properties
    JkWorkersFile /etc/httpd/conf/workers.properties

    # Where to put jk logs
    JkLogFile     /var/log/httpd/mod_jk.log

    # Set the jk log level [debug/error/info]
    JkLogLevel    info

    # Select the log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

    JkMount /xwiki ajp13w
    JkMount /xwiki/* ajp13w

    JkMount /admin ajp13w
    JkMount /admin/* ajp13w

    JkMount /servlets-examples ajp13w
    JkMount /servlets-examples/* ajp13w

    JkMount /webdav ajp13w
    JkMount /webdav/* ajp13w

    JkMount /balancer ajp13w
    JkMount /balancer/* ajp13w

    JkMount /jsp-examples ajp13w
    JkMount /jsp-examples/* ajp13w

    JkMount /host-manager ajp13w
    JkMount /host-manager/* ajp13w

    JkMount /tomcat-docs ajp13w
    JkMount /tomcat-docs/* ajp13w

    JkMount /manager ajp13w
    JkMount /manager/* ajp13w
#</VirtualHost>

  1. Restart Apache and Tomcat (order is not important)
  2. Verify there are no errors from the system logs, specifically - apache error logs. This will confirm that the mod_jk did not generate errors on Apache start.
  3. Verify that the most current log in ${YOUR_TOMCAT_HOME}/logs has no errors introduced
  4. Verify your sites that were reachable as http://your.domain:8080/yourapp/ is now reachable as http://your.domain/yourapp/

Creator: Dennis Coonich on 2009/02/25 03:22
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 1.8.2.19075 - Documentation