HOW-TO: Building and configuring mod_jk on OS X (Tiger)

Brief HOW-TO building and configuring mod_jk on OS X (Tiger)

  1. Download the mod_jk source:

  2. Expand and cd to jakarta-tomcat-connectors-1.2.15-src/jk/native

  3. ./configure --with-apxs=/usr/sbin/apxs

  4. cd apache-1.3/

  5. make -f Makefile.apxs

  6. sudo cp /usr/libexec/httpd/

  7. sudo chmod ugo+x /usr/libexec/httpd/

  8. Create a workers prop file:

    This file will be referenced by the mod_jk configuration section in /etc/httpd/httpd.conf, so it can be placed anywhere, as long as subsequent references have the correct path. By convention it is usually placed in the Tomcat server's conf dir (e.g. /usr/local/tomcat/conf/

  9. Add the following to the end of /etc/httpd/httpd.conf:

    LoadModule jk_module libexec/httpd/
    JkWorkersFile /usr/local/tomcat/conf/
    JkLogFile /private/var/log/httpd/mod_jk.log
    JkLogLevel trace
    JkMount /* myworker

  10. sudo apachectl restart

All requests sent to the Apache host will now be forwarded on to the Tomcat server.