Apache+Tomcat mod_jk方式, Linux环境下,请求没有自动转发问题

Apache 2.2.17
Tomcat 5.5.20
OS CentOS5.2

---------------------------------------------
workers.properties 配置如下:

worker.list=lbcontroller  
#Tomcat1实例配置  
worker.tomcat1.host=192.168.3.99
worker.tomcat1.port=8009
worker.tomcat1.type=ajp13  
worker.tomcat1.lbfactor = 1  

#Tomcat2实例配置  
worker.tomcat2.host=192.168.3.99
worker.tomcat2.port=9009  
worker.tomcat2.type=ajp13  
worker.tomcat2.lbfactor = 1  

worker.lbcontroller.type=lb  
worker.lbcontroller.balance_workers=tomcat1,tomcat2
worker.lbcontroller.sticky_session=True

------------------------------------------------------
httpd.conf 配置如下

LoadModule jk_module modules/mod_jk-apache-2.0.55.so  
JkWorkersFile conf/workers.properties  
JkMount /* lbcontroller

------------------------------------------------------

目前情况:
Apache 正常启动, http://192.168.3.99 正常打开Apache欢迎界面
Tomcat 正常启动, http://192.168.3.99:8081 正常打开大猫界面

问题: 在Tomcat中Webapps下放置index.jsp页面,想通过http://192.168.3.99 自动跳转, 结果不成功,即Apache没有将访问请求转发到Tomcat上,求解~~~~~~~

作者: yinmoz   发布时间: 2011-03-28

就是说tomcat没有处理动态页面咯? 这个是在在Apache Software Foundation\Apache2.2\conf\extra\ httpd-vhosts 最后:

<VirtualHost *:80>
  ServerAdmin email
  DocumentRoot E:/workspace/chinays/WebRoot  
  ServerName www.chinays.hk
JkMount /*.jsp tomcat1(此处的tomcat1与workers.properties文件中的worker.list=tomcat1要一致). #让Apache支持对jsp传送,用以Tomcat解析
JkMount /*.do tomcat1 #让Apache支持对.do传送,用以Tomcat解析 # ServerAlias xx.com
  <Directory E:/workspace/chinays/WebRoot>
  Options Indexes FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all
  </Directory>
</VirtualHost>

 


作者: didiaomo2014   发布时间: 2011-03-28