Apache2.2.4+tomcat-5.5.17+mod_jk-1.2.26-httpd-2.2.4.so整合问题,访问显示源码

Apache2.2.4+tomcat-5.5.17+mod_jk-1.2.26-httpd-2.2.4.so整合问题,访问显示源码

httpd.conf是这样改的
LoadModule jk_module modules/mod_jk.so

JkWorkersFile "F:/Apache2.2/conf/workers2.properties" 
JkLogFile F:/Apache2.2/logs/mod_jk.log   
JkLogLevel info 
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

JkMount /*.jsp ajp13 
JkMount /*.do ajp13 
JkMount /servlet/* ajp13 

#设置虚拟主机
<VirtualHost 127.0.0.1:80>
      ServerAdmin huazenglian2008@hotmail.com 
      DocumentRoot "F:/apache-tomcat-5.5.17/webapps"         
      ServerName  127.0.0.1         
      DirectoryIndex index.htm index.html index.jsp 
      ErrorLog logs/dummy-host.example.com-error_log
      CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>


tomcat的server.xml
在 <host>里面加了
<Context path="/myweb" docBase="F:\apache-tomcat-5.5.17\webapps\myweb" debug="0" reloadable="true"> </Context>

workers2.properties文件的内容是:
[shm]   
file=${serverRoot}/logs/shm.file   
size=1048576   
   
#  Example  socket  channel,  override  port  and  host.   
[channel.socket:localhost:8009]   
port=8009   
host=127.0.0.1 
   
#  define  the  worker   
[ajp13:localhost:8009]   
channel=channel.socket:localhost:8009   
   
#  Uri  mapping   
[uri:/*]   
worker=ajp13:localhost:8009

现在apache可以正常启动,tomcat访问http://127.0.0.1:8080/myweb正常,
http://127.0.0.1/myweb访问显示源码
请高手看看哪里配置有问题

httpd.conf里面改成
JkWorkersFile "F:/Apache2/conf/workers.properties" 

workers.properties文件里面是这样
ps=/
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

worker.ajp13.lbfactor=1


worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13
也没用,跟刚才是一样的现象,访问显示源码

问题找到了,用workers.properties

JkMount /*.jsp ajp13 
JkMount /*.do ajp13 
JkMount /servlet/* ajp13
写到
<VirtualHost>
里面就可以了
或者 <VirtualHost>弃掉,JkMount 保留在原来位置