关闭

Apache-2.0.58与apache-tomcat-5.5.17整合

906人阅读 评论(1) 收藏 举报

1、软件目录:
/opt/apache-2.0.58
/opt/apache-tomcat-5.5.17

2、下载最新的mod_jk
jakarta-tomcat-connectors-1.2.15-src.tar.gz 按照要求安装
/root/jakarta-tomcat-connectors-1.2.15-src/jk/native
./buildconf
./configure --with-apxs=--with-apxs=/opt/apache-2.0.58/bin/apxs
./make
./make install

cp apache-2.0/mod_jk.so /opt/apache-2.0.58/modules/

3、配置apache:
1.配置workers属性文件:在apache的conf目录中建立workers.properties文件,内容如下:
ps=/
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=192.168.1.75
worker.worker1.type=ajp13
worker.worker1.socket_keepalive=true

4.配置httpd.conf:
在LoadModule配置部分加入一下内容:
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile /opt/apache-2.0.58/conf/workers.properties
# Where to put jk logs
JkLogFile     /opt/apache-2.0.58/logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel    info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat     "%w %V %T"

#我在http.conf最后增加了
JkMount /* worker1

5 配置tomcat:
server.xml文件:
找到<Engine>…</Engine>增加jvmRoute属性:
<Engine jvmRoute="worker1"  name="Catalina" defaultHost="localhost">

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    文章分类
    最新评论