apache2.2 + tomcat 5.0 by JK_mod

1.下载mod_jk-apache-2.2.2.so,放入D:\Program Files\Apache Software Foundation\Apache2.2\modules目录下
 
2.修改Tomcat的conf\server.xml :
在<Engine name="Catalina" defaultHost="localhost" debug="0">下面加一句
 <listener classname="org.apache.jk.config.ApacheConfig" modjk="D:\Program Files\Apache Software Foundation\Apache2.2\modules\mod_jk-[iocblog.net 来源]

apache-2.2.2.so"/>
 
3.在apache安装目录下的conf目录中创建workers.properties文件,内容如下
 
workers.apache_log=D:\Program Files\Apache Software Foundation\Apache2.2\logs
workers.tomcat_home=D:\Tomcat 5.0
ps=# the list of workers
worker.list=ajp13
# worker "ajp13" will talk to Tomcat listening on machine localhost at port 8009 using 3 lb factor
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
worker.ajp13.lbfactor=3
# worker "ajp13" use up to 10 sockets, which will stay no more than 10mn in cache
worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
# worker "ajp13" ask operating system to send KEEP-ALIVE signal on the connection
worker.ajp13.socket_keepalive=1
# worker "ajp13" want ajp13 connection to be dropped after 5mn (recycle)
worker.ajp13.recycle_timeout=300
# Define the LB worker[iocblog.net 来源]
worker.router.type=lb
worker.router.balance_workers=ajp13
# Add the status worker to the worker list
worker.list=jkstatus
# Define a 'jkstatus' worker using status
worker.jkstatus.type=status
# Add the jkstatus mount point
JkMount /jkmanager/* jkstatus
# Enable the JK manager access from localhost only
<location>
JkMount jkstatus
Order deny,allow
Deny from all
Allow from 127.0.0.1
</location>

 
4.修改apache的conf/httpd.conf文件:
 
在文件最后加入
 
LoadModule jk_module "modules/mod_jk-apache-2.2.2.so"
JkWorkersFile "D:/Program Files/Apache Software Foundation/Apache2.2/conf/workers.properties"
JkLogFile "D:/Tomcat 5.0/logs/mod_jk.log"
JkLogLevel info
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
Alias /kms "D:/Tomcat 5.0/webapps/kms"
<Directory "D:/Tomcat 5.0/webapps/kms">
Options Indexes MultiViews
AddOutputFilter Includes html
AllowOverride None
Order allow,deny
Allow from all
</Directory>
 
 
5. 重启 apache和tomcat ,访问http://localhost/kms 即可




文章整理:iocblog
版权申明:本站文章均来自网络,如有侵权,请联系我们,我们收到后立即删除,谢谢!
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。