Installing Apache and Tomcat and Mysql on Windows 7
Installing Apache and Tomcat and Mysql on Windows 7 - Install mod_jk on Windows PDF Print E-mail
Written by Administrator   
Sunday, 05 December 2010 15:26
Article Index
Installing Apache and Tomcat and Mysql on Windows 7
Installing Apache on WIndows
Tomcat Windows Install
Install mod_jk on Windows
Setting Up Tomcat Manager
Deploying a GWT app on your Tomcat Server
Installing Mysql on Window 7
Installing JDBC
JDBCHello JDBC Test Project for Eclipse
All Pages

Installing the Tomcat - Apache Connector mod_jk


Do I need mod-jk?

I was looking through the follow tutorial:  http://www.johnturner.com/howto/winxp-howto.html
Apparently I need to download and install something called mod-jk

The official instructions are here:
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

These instructions were a bit vague: saying things like
The simplest way to configure Apache to use mod_jk is to turn on the Apache auto-configure setting in Tomcat and put the following include directive at the end of your Apache httpd.conf file

uhh... guys?  How do you ‘turn on the Apache auto-configure?’

This place seemed to have better info:
http://www.jajakarta.org/tomcat/tomcat3.2-4.0/tomcat-3.2.3/doc/mod_jk-howto.html#s7

To configure Tomcat to generate the Apache auto-configuration add the following block to your TOMCAT_HOME/conf/server.xml file after <AutoWebApp ... />.
<ApacheConfig />

This is crap.   There is no instance of the string ‘AutoWebApp’ in server.xml .  I need a better tutorial:

http://www.anchor.com.au/hosting/dedicated/tomcat_with_apache_on_windows_x64



So I downloaded
mod_jk-1.2.31-httpd-2.2.3.so
From a mirror.   Although they have win64 directories in the mirrors,  they do not have this for Apache, since I guess we are running a 32bit version of apache I guess.

I renamed the file mod_jk.so and placed in the d:\apache\modules folder.


Just below the line:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
Add the following:
<Listener className="org.apache.jk.config.ApacheConfig" modJk="c:/apache/httpd/modules/mod_jk.so"
workersConfig="c:/apache/tomcat/conf/jk/workers.properties" />
And just below the line:
<Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
Add the following line:
<Listener className="org.apache.jk.config.ApacheConfig" append="true"
forwardAll="false" modJk="c:/apache/httpd/modules/mod_jk.so" />

Save the changes made to server.xml and restart the Tomcat service.
  • Wait a few seconds, and then check to see if there is a file called mod_jk.conf in tomcat/conf/auto directory.
  • If there is not, you did something wrong!


ok so I went in Computer Management from the control panel and restarted the Apache Tomcat service.

Haha!  It was there!!!!!   Wahoo!
Create the workers.properties file in tomcat/conf/jk, with the following lines to it:
  • # BEGIN workers.properties
    # Definition for Ajp13 worker
    worker.list=ajp13
    worker.ajp13.port=8009
    worker.ajp13.host=localhost
    worker.ajp13.type=ajp13
    # END workers.properties
Last Updated on Sunday, 05 December 2010 18:27
 

Sponsored Links

Bold Inventions, Powered by Joomla!; Joomla templates by SG web hosting