I've configured lately such a configuration. I first tried to use the
jk2 module, but soon discovered that it was deprecated and much more
complex to use. I really recommend using jk. 

There are big differences in the configuration directives required in
the httpd.conf by jk and jk2. Since I've never succeded in installing
jk2, I'll provide you with instructions regarding jk.


First, in httpd.conf, load your module :

LoadModule jk_module modules/mod_jk.so


Then, protect your WEB-INF directories :

<Directory c:/Tomcat5/webapps/exampleApp/WEB-INF>
    Options -Indexes FollowSymLinks
    Deny from all
</Directory>


Then, between section 2 and 3 of httpd.conf, add the jk configuration :

JkWorkersFile "conf/workers.properties"
JkLogFile "logs/mod_jk.log"
JkLogLevel info
JkLogStampFormat "< %a %b %d %Y - %H:%M:%S > -=- "


Create an alias :

Alias /exampleApp c:/Tomcat5/webapps/exampleApp


Define which files are to be served by Tomcat :

JkMount / exampleApp/*.jsp tomcat5
JkMount / exampleApp/*.do tomcat5

(Note that here, tomcat5 refers to the name of the "worker" as defined
in the workers.properties file. See below for details)


Create two empty log files within the conf directory of apache with 777
rights :

mod_jk.log and jk-tomcat5.log


Create a workers.properties file in your Apache/conf directory and add
this :

ps=/
worker.list=tomcat5

worker.tomcat5.port=8008
worker.tomcat5.host=localhost
worker.tomcat5.type=ajp13
worker.tomcat5.lbfactor=1

(This is a VERY simple configuration file. Refer to the Apache Jakarta
webpage for details on how to configure this file.)



In your Tomcat server.xml file, under the line :
<Server port="8005" shutdown="SHUTDOWN" debug="1"\>
Add the following :

<Listener className="org.apache.jk.config.ApacheConfig"
        configHome="c:\Tomcat5\"
        modJk="c:\Apache2\modules\mod_jk.so"
        jkWorker="tomcat5"
        forwardAll="False"
        jkLog="c:\Apache2\logs\jk-tomcat5.log"
        jkDebug="debug"
        noRoot="False"
        workersConfig="c:\Apache2\conf\workers.properties" />


At last, inside the "<Service (...)>" tag, add:

<Connector
        port="8008"
        protocol="AJP/1.3"
        protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
        redirectPort="8443">
</Connector>



There you are ! It took me three days to figure that out, hope it serves
you well !

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to