日期:2014-05-16  浏览次数:21113 次

Apache和Tomcat配置负载均衡时遇到的问题
Apache配置VirtualHost后JK就不管用了,不能交给Tomcat去执行,
把VirtualHost去掉后JK又可以了,这样的问题大家遇到过没? 
 
httpd.conf:
  <Directory "E:\apache-tomcat-6.0.18\webapps\map">
   Options FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
  </Directory>
 
  <VirtualHost *:80>
ServerName www.map.cn
DocumentRoot E:\apache-tomcat-6.0.18\webapps\map
  </VirtualHost>
 
Include conf/mod_jk.conf
 
mod_jk.conf:
LoadModule jk_module modules/mod_jk-1.2.28-httpd-2.2.3.so
 
JkWorkersFile conf/workers.properties
 
JkLogFile logs/mod_jk.log
 
JkLogLevel info
 
JkMount /* wlb
 
workers.properties:
worker.list=wlb,jkstatus
 
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009
 
worker.wlb.type=lb
worker.wlb.balance_workers=ajp13w
 
worker.jkstatus.type=status



问题已经解决
问题已经解决
在VirtualHost下加入JkMountCopy On即可,真是费了九牛二虎之力啊,还是JkLogLevel debug看看log才知道的,呵呵。