tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luc_boudr...@uqss.uquebec.ca
Subject RE: Paths for JkMount
Date Tue, 14 Jun 2005 13:52:52 GMT
Hi,

 

Well, I never made any research on Jk with Virtual Hosting, but I think
this might help. It's a reply I gave to someone who asked for
configuration instructions with Tomcat 5.5, Apache 2 and Jk. Hope it
helps !

 

 

 

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 !

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message