Apache2.2 & Tomcat6.×整合方案

1.将mod_jk-apache-2.2.4.so文件放在apache安装目录的Modules目录下,改名mod_jk.so。

2.在apache安装目录的conf文件底部添加

LoadModule jk_module modules/mod_jk.so

JkWorkersFile "Tomcat安装目录/conf/workers.properties"
JkLogFile " Tomcat安装目录/logs/mod_jk.log"
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
JKMount /cms/* ajp13
3.在tomcat/conf下建立workers.properties文件

内容为

#
# workers.tomcat_home should point to the location where you
# installed tomcat. This is where you have your conf, webapps and lib
# directories.
# Tomcat安装目录,例如D:/ApacheGroup/Tomcat5
workers.tomcat_home="d:/tomcat/"
#
# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
# JDK安装目录,例如D:/program/JBuilder9/jdk1.4
workers.java_home="d:/Java/jdk"
#
# You should configure your environment slash... ps=/ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=/

# Define 1 real worker using ajp13
worker.list=ajp13
# Set properties for worker1 (ajp13)
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
worker.ajp13.lbfactor=50
worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300

你可能感兴趣的:(Apache2.2 & Tomcat6.×整合方案)