mod_jk for RHEL6


If you have a RHEL6 box which ships both Apache and Tomcat6 you might want to connect the two together. You probably have looked around for mod_jk as a RHEL6 RPM or SRPM (src.rpm).

You find that It isn't in EPEL, and it isn't in Red Hat Optional Server 6 RHN channel, etc.

It seems that the new way forward with RHEL/Fedora world is to use mod_proxy_ajp. For example, the RH/Fedora project Spacewalk switched from mod_jk to mod_proxy_ajp.

Note that mod_proxy_ajp is a core module of Apache 2.2 and newer so this should be a rather definitive/final change in recommended connector for Tomcat and Apache.

Read the docs, but to get you started in configuration first you'll want to configure Tomcat's conf/server.xml file to have something like (which may already exist):

<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />

And Apache with something like:

<Proxy *>
 AddDefaultCharset Off
 Order deny,allow
 Allow from all

ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/