最近遇到个问题,就是在整合的时候直接把jsp页面在浏览器给读出来了,过程如下
1.将连接文件放入,C:\apache\modules,改为mod_jk.so
2,在tomcat conf下目录下写一个workers.properties
workers.tomcat_home=E:\apache-tomcat-6.0.18 #让mod_jk模块知道Tomcat的位置
workers.java_home=E:\Program Files\Java\jdk1.5.0_04 #让mod_jk模块知道jre的位置
ps=\
worker.list=ajp13 #模块版本
worker.ajp13.port=8009 #工作端口,若没占用则不用修改
worker.ajp13.host=localhost #本机,若上面的Apache主机不为localhost,作相应修改
worker.ajp13.type=ajp13 #类型
worker.ajp13.lbfactor=1 #代理数,不用修改
3,httpd.conf最下面加入
LoadModule jk_module modules\mod_jk.so
JkWorkersFile "E:\apache-tomcat-6.0.18\conf\workers.properties"
JkLogFile "E:\apache-tomcat-6.0.18\logs\mod_jk2.log"
JkLogLevel info
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
JkMount /*.do ajp13
JkMount /*.js ajp13
4,http.conf下面 添加两个站点
http-vhosts.conf
ServerName www.fqy.com
ServerAdmin 309684359@qq.com
DocumentRoot "d:/test/lzlt"
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog logs/errorraisoocomcn.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog logs/access.log common
ServerSignature On
ServerName www.fff.com
ServerAdmin 309684359@qq.com
DocumentRoot "d:/test/ajax"
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog logs/errorraisoocomcn.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog logs/access.log common
ServerSignature On
5,tomcat下server.xml加两个站点
</Host>
<Host name="www.fqy.com" appBase="d:\test\lzlt">
<Context path="" reloadable="false" docBase="d:\test\lzlt"/>
谁能告诉我,这到底是怎么回事