Document Index
- Introduction
- Document status
- What we do and don't cover
- Before you start - Requirements
- The actual compile process
- Concussion
Introduction
I was unable to find decent documentation that explains the steps required to get mod_jk working with the Apache HTTPD 2 server. With the help of some people on #apache on irc.freenode.net, we found a solution. This document outlines this solution. Special mention to Simon "janus" Dassow for the massive contributions he made to this effort. He can be reached by e-mail at simon dot dassow at vup-interactive dot de (sorry for the munging but spambots are crawling this site)
Document IndexDocument Status
This document is complete to the point where the instructions work on FreeBSD 4.7-STABLE with httpd-2.0.43. If you manage to get this working with other operating systems / distributions, please let me know by clicking this link and filling out the form.
Document IndexWhat we do and don't cover
We do not cover how to install the required packages or applications to make this work. We do not cover use of the FreeBSD ports system or the Apache HTTPD server build process.
Document IndexBefore you start - Requirements
You will need to have the following tools installed on your system:
- autoconf
- automake
- libtool
- Apache HTTPD server version 2 (httpd-2.0.43 in this example)
I installed all of these tools with the exception of Apache from the FreeBSD ports tree.
Document IndexThe actual compile process
Now for the fun part. First, download a suitable version of the jakarta-tomcat-connectors source. I chose 4.0.6 for this example, which I got from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.6/src/jakarta-tomcat-connectors-4.0.6-src.tar.gz. into a suitable location on your system and change into the jakarta-tomcat-connectors-4.0.6- src/jk/native directory. Next, run ./buildconf.sh. This should work fine if you have all of the required applications (see above) installed.
Now run ./configure. You should get the following message:
scripts/build/unix/ltconfig: .: /dev/null: not a regular file
ltconfig: you must specify a host type if you use `--no-verify'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed
If you do get the above message, then you need to edit the configure script. Open this in your favourite editor and search for the line that contains --no-verify. There should only be one occurance of this and you should delete the entire line. Delete --no-verify, save the configure script and proceed. Once your configure script is working, you need to run it for the real world. On my system, I did ./configure --with-apxs=/usr/local/httpd-2.0.43/bin/apxs
You should change the path in --with-apxs to reflect the full path to your httpd-2 apxs binary. When the configure script has finished running, just dogmake && sudo gmake installThis will place the mod_jk.so into the modules directory of your httpd installation. You may now complete installation of mod_jk by configuring your Apache HTTPD server.
At the very minimum for configuration of your Apache HTTPD server, you need a LoadModule line that loads the mod_jk module, and a JkWorkersFile. You should also define a JkLogFile and a JkLogLevel (I use info)
Document IndexConcussion
I hope that these instructions work for you. If you have any questions that aren't answered here, please contact me using the links at the bottom of this page.
Document Index