最新版 apache_2.2.11 与 apache-tomcat-6.0.18 集成方案配置信息如下:??????-- ????Engine nameCatal
最新版 apache_2.2.11 与 apache-tomcat-6.0.18 集成方案
配置信息如下:
??
????-->
????<Engine name="Catalina" defaultHost="localhost">
????????<Listener className="org.apache.jk.config.ApacheConfig"
??????????? workersConfig="conf/jk/workers.properties"
??????????? modJk="E:/Apache2.2/modules/mod_jk.so"
??????????? jkLog="logs/mod_jk.log"
??????????? jkDebug="info"
??????????? jkWorker="worker1"
??????????? noRoot="true"
????????/>
??????<!--For clustering, please take a look at documentation at:
?????????? /docs/cluster-howto.html?? (simple how to)
?????????? /docs/config/cluster.html (reference documentation) -->
??????<!--
?????? <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
??????-->????????
?
4.修改 Apache httpd.conf 文件
在文件最后加上
#To be added at the end of your httpd.conf
Include E:/Tomcat/conf/auto/mod_jk.conf
?
5.重启 Tomcat 并自动生成 mod_jk.conf
我生成的mod_jk.conf为:
?
########## Auto generated on Wed Apr 29 18:08:28 CST 2009##########
<IfModule !mod_jk.c>
?? LoadModule jk_module "E:/Apache2.2/modules/mod_jk.so"
</IfModule>
JkWorkersFile "E:/Tomcat/conf/jk/workers.properties"
JkLogFile "E:/Tomcat/logs/mod_jk.log"
JkLogLevel info
<VirtualHost localhost>
???? ServerName localhost
???? JkMount /manager worker1
???? JkMount /manager/* worker1
???? JkMount /docs worker1
???? JkMount /docs/* worker1
???? JkMount /examples worker1
???? JkMount /examples/* worker1
???? JkMount /host-manager worker1
???? JkMount /host-manager/* worker1
???? JkMount /YangFan worker1
???? JkMount /YangFan/* worker1
</VirtualHost>
?
6.启动 Apache 并测试配置,如果版本和我一致的话,应该成功。如果不成功就是路径配置有问题。
都启动好以后,地址栏输入http://localhost/****(tomcat中的项目目录),如果成功进入项目就说明配置成功。
OK,集成完成。