httpd-vhosts.conf 的配置如下:
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerAdmin
l@163.com
DocumentRoot "D:\app\discuz"
DirectoryIndex index.html index.php
ServerName
www.gongsi123.com
ErrorLog "logs/www.gongsi123.com-error.log"
CustomLog "logs/www.gongsi123.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin
la@163.com
DocumentRoot "D:\app\footsky"
DirectoryIndex index.html index.jsp
ServerName www.footsky.com
ErrorLog "logs/www.footsky.com-error.log"
CustomLog "logs/www.footsky.com-access.log" common
</VirtualHost>
www.gongsi123.com的配置为PHP,www.footsky.com的配置为TOMCAT
结果PHP没问题,TOMCAT总显示这样的代码
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<logic:redirect forward="bbsmain"/>
是什么原因?该如何解决,谢谢!
再贴下TOMCAT的配置
works.properties
#让mod_jk模块知道Tomcat的安装路径
workers.tomcat_home=D:\apache-tomcat-6.0.13
#让mod_jk模块知道jdk路径
workers.java_home=C:\Program Files\Java\jdk1.5.0_08
ps=\
#这里是关键,名字要和httpd.conf的一致。如果这里改了httpd.conf也要改。
worker.list=ajp13
#工作端口,tomcat的jk监听端口,可以查看Tomcat 的Server.xml中有port="8009"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
#这样的Connectorworker.ajp13.port=8009
#Tomcat所在机器,如果安装在与apache不同的机器则需要设置IP
Connectorworker.ajp13.port=8009
worker.ajp13.host=localhost
#类型,Apache与Tomcat之间传递使用的协议
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
文件里httpd.conf
# 加载mod_jk.dll动态链接库模块,使之与tomcat通讯
LoadModule jk_module modules/mod_jk-1.2.26-httpd-2.2.4.so
# jkWorkersFile:指明工作时tomcat相关文件workers.properties位置
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
# jkMount:指明当遇到*.jsp时,交由ajp13协议,继而转发给tomcat处理。
JkMount /*.jsp ajp13
JkMount /*.do ajp13
JkMount /servlets/* ajp13