aspose file tools*
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
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
Author

mod_jk problem in tomcat 5.5.23 with Apache 2.2.4

Purujit Saha
Ranch Hand

Joined: Nov 01, 2005
Posts: 86
Hi,

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/mod_jk.so" />

<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"
xmlNamespaceAware="false">
<Listener className="org.apache.jk.config.ApacheConfig" append="true" forwardAll="false"

modJk="/mfg/hnp/apache-2.2.4/modules/mod_jk.so" />

</Host>
</Engine>


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

# BEGIN workers.properties
worker.list=ajp13
worker.ajp13.port=8009
# change this line to match apache ServerName and Host name in server.xml
worker.ajp13.host=p10dvl
worker.ajp13.type=ajp13
# END workers.properties


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/mod_jk.so"
</IfModule>

JkWorkersFile "<tomcat_home>/conf/jk/workers.properties"
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
</Directory>

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

</VirtualHost>


====================================

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 /0.0.0.0:8009
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 /0.0.0.0:8009 ] 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.

Thanks
Purujit Saha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mod_jk problem in tomcat 5.5.23 with Apache 2.2.4