http://java.sun.com/j2se/1.5.0/download.jsp,下载J2SE5 2)到http://apache.justdn.org/httpd/binaries/win32/apache_2.0.53-win32-x86-no_ssl.msi,下载Apache 2.0.53 3)到http://apache.just" name="description" />
一、下载软件
1)到java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp,下载J2SE5
2)到http://apache.justdn.org/httpd/binaries/win32/apache_2.0.53-win32-x86-no_ssl.msi,下载Apache 2.0.53
3)到http://apache.justdn.org/jakarta/tomcat-5/v5.5.7/bin/jakarta-tomcat-5.5.7.exe,下载Tomcat/5.5.7
4)到http://apache.justdn.org/jakarta/tomcat-connectors/jk/binaries/win32/jk-1.2.8/,下载mod_jk-1.2.8-apache-2.0.52.so
*apche网站上很明确不支持使用mod_jk2,并且不再对mod_jk2提供后续支持http://jakarta.apache.org/tomcat/connectors-doc/changelog.html
JK2 has been put in maintainer mode and no further development will take place. The reason for shutting down JK2 development was the lack of developers interest. Other reason was lack of users interest in adopting JK2, caused by configuration complexity when compared to JK.
二、安装
1)J2SE5
2)Apache 2.0.53
3)Tomcat/5.5.7
4)将mod_jk-1.2.8-apache-2.0.52.so改名为 mod_jk.so 并放在Apache2/modules文件夹
三、配置
1、编辑Apache2\conf\httpd.conf文件,
1)在LoadModule那一段代码后面添加:
LoadModule jk_module modules/mod_jk.so
为的是让apache加载mod_jk.so,用于处理Apache和Tomcat的连接。
2)在最后添加
JkMount /*.jsp worker1
JkMount /*.jspx worker1
JkLogFile logs\mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
2、在Apache Group\Apache2\conf目录下新建workers.properties文件(文件后缀名就是properties),内容如下:
# Define 1 real worker using ajp13
workers.tomcat_home="d:\niss\Tomcat5"
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.reclycle_timeout=300
四、测试
1、重新启动httpd和Tomcat,
2、在地址栏中输入:http://XXX/index.jsp
如果显示Tomcat页面,成功!