File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes mod_jk problem in tomcat 5.5.23 with Apache 2.2.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "mod_jk problem in tomcat 5.5.23 with Apache 2.2.4" Watch "mod_jk problem in tomcat 5.5.23 with Apache 2.2.4" New topic

mod_jk problem in tomcat 5.5.23 with Apache 2.2.4

Purujit Saha
Ranch Hand

Joined: Nov 01, 2005
Posts: 86

I am using apache webserver 2.2.4 and apache-tomcat 5.5.23 on Solaries 5.10.
I have installed both of them successfully.
Both the server are running standalone. Apache configures at 61696 port and tomcat at 61697 port.
I am using JK connector (tomcat-connectors-1.2.22) to connect them.

My Configuration details are,

1. I have added the following line in apache config file [apache_home/conf/httpd.conf]

Include /mfg/hnp/apache-tomcat-5.5.23/conf/auto/mod_jk.conf

2. I have also added the following lines in Tomcat config file [tomcat_home/conf/server.xml)

<Listener className="org.apache.jk.config.ApacheConfig" modJk="<apache_home>/modules/" />

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

and also

<Engine name="Catalina" defaultHost="p10dvl">
<Host name="p10dvl" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false"
<Listener className="org.apache.jk.config.ApacheConfig" append="true" forwardAll="false"

modJk="/mfg/hnp/apache-2.2.4/modules/" />


3. [<tomcat_home>/conf/jk/]

# change this line to match apache ServerName and Host name in server.xml

Now when i start the tomcat and apache subsequently,

the file has been created by tomcat server [ <Tomcat_home>/conf/auto/mod_jk.conf]

<IfModule !mod_jk.c>
LoadModule jk_module "<apache_home>/modules/"

JkWorkersFile "<tomcat_home>/conf/jk/"
JkLogFile "<tomcat_home>/logs/mod_jk.log"

JkLogLevel emerg

<VirtualHost p10dvl>
ServerName p10dvl

# Static files
Alias /test "apache-tomcat-5.5.23/webapps/test"

<Directory "<tomcat_home>/webapps/hnp">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp

JkMount /test/*.jspx ajp13
JkMount /test/servlet/* ajp13
JkMount /test/*.jsp ajp13



i am also getting the following log message from tomcat log file [catalina.out ]

line 1: INFO: Starting Coyote HTTP/1.1 on http-61697
line 2:Apr 24, 2007 9:50:31 AM org.apache.jk.common.ChannelSocket init
line 3:INFO: JK: ajp13 listening on /
line 4:Apr 24, 2007 9:50:31 AM org.apache.jk.server.JkMain start
line 5:INFO: Jk running ID=0 time=0/125 config=null
line 6:Apr 24, 2007 9:50:31 AM org.apache.catalina.storeconfig.StoreLoader load
line 7:INFO: Find registry server-registry.xml at classpath resource
line 8:Apr 24, 2007 9:50:32 AM org.apache.catalina.startup.Catalina start
line 9:INFO: Server startup in 7769 ms

Specially i am pointing to line 3 [listening on / ] and line 5 [config=null] of the log message.

Please let me know if i have configured the apache with tomcat corectly. If not please let me know what else i have to do.

Purujit Saha
I agree. Here's the link:
subject: mod_jk problem in tomcat 5.5.23 with Apache 2.2.4
jQuery in Action, 3rd edition