Windows下用tomcat-connectors集成tomcat和apache httpd

How to integrate apache httpd and tomcat server in windows using mod_jk

http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

ENV: httpd version 2.2 port 80 tomcat version 6.0 OS winxp 32 sp3
Apache httpd folder:C:\Program Files\Apache Software Foundation\Apache2.2
Tomcat folder: D:\Tool\apache-tomcat-6.0.10
JDK: Java SE 1.6.0_19
Steps:
1 install httpd and tomcat server
2 add below directives in httpd.conf
[color=blue]LoadModule jk_module modules/mod_jk.so
JkWorkersFile "C:\Program Files\Apache Software Foundation\Apache2.2\conf\workers.properties"
JkLogFile "C:\Program Files\Apache Software Foundation\Apache2.2\logs\mod_jk.log"
JkLogLevel error
JkMount /ilnba2 tomcat
JkMount /ilnba2/* tomcat[/color]
3 download the right mod_jk.so from http://apache.freelamp.com/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.28/ put it into
C:\Program Files\Apache Software Foundation\Apache2.2\modules\mod_jk.so
4 creat the workers.properties in conf folder as below
[color=blue]workers.tomcat_home=D:\Tool\apache-tomcat-6.0.10
workers.java_home=$JAVA_HOME
ps=/
worker.list=tomcat

worker.tomcat.port=8009 #check your tomcat server.xml, make sure the ajp13 port is 8009
worker.tomcat.host=localhost
worker.tomcat.type=ajp13
[/color]
5 make sure there is an application named ilnba2 in your tomcat webapps folder
6 start tomcat and apache server
7 browe below url in your IE: http://localhost/ilnba2 to check whether the integration is OK now.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值