Wednesday, December 08, 2004

Setting up java tomcat on linux VIII - Configure Tomcat for mod_jk Connector

Configure Tomcat for mod_jk Connector

Directly below this line in '/usr/local/tomcat/conf/server.xml'

<Server port='8005' shutdown='SHUTDOWN' debug='1'\>

Add these lines:
<Listener className='org.apache.ajp.tomcat4.config.ApacheConfig'
modJk='/usr/local/apache2/modules/mod_jk.so'
workersConfig='/usr/local/tomcat/conf/jk/workers.properties'/>

Directly below this line in '/usr/local/tomcat/conf/server.xml'

<Host name='localhost' debug='0' appBase='webapps'>

Add this line

<Listener className='org.apache.ajp.tomcat4.config.ApacheConfig'
append='true' forwardAll='false'
modJk='/usr/local/apache2/modules/mod_jk.so' />

Comment out JK2 connector, and uncomment AJP1.3 connector (jk).(Does not appear to be required for tomcat5)
Change instances of localhost to whatever your domain name is

Create file '/usr/local/tomcat/conf/jk/workers.properties' with these contents:

# Setting Tomcat & Java Home
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/java/java
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

No comments:

Post a Comment