QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1654|回复: 1

apache+tomcat整合后虚拟目录不能解析jsp的问题

[复制链接]
发表于 2005-7-8 15:48:21 | 显示全部楼层 |阅读模式
我的apache+tomcat整合好后,虚拟主机的jsp处理正常,但是虚拟目录有问题,死活不能用tomcat解析虚拟目录的jsp文件,怎么设置都不行。我的apache配置文件如下:
[code:1]<VirtualHost *:80>
    ServerName hk.wa-wa.com.cn
#    ServerAlias wa-wa.com.cn *.wa-wa.com.cn
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName hkwap.wa-wa.com.cn
    DocumentRoot /opt/tomcat-5.0.28/webapps/WAP2005
    DirectoryIndex index.jsp index.htm index.html default.htm index.php
    Alias /jsp/ "/opt/tomcat-5.0.28/webapps/jsp/"
    <Location ~ "/*.jsp|/*/servlet/*>
    JkUriSet worker ajp13:localhost:8009
    </Location>
    ErrorLog logs/hkwap.wa-wa.com.cn-error_log
    CustomLog logs/hkwap.wa-wa.com.cn-access_log common
</VirtualHost>[/code:1]
hkwap.wa-wa.com.cn这个虚拟主机的jsp解析都正常,但是这个虚拟主机下面的/jsp/虚拟目录死活都不能用tomcat解析jsp文件,我在tomcat也尝试过设定该虚拟目录,但是通过tomcat的端口访问正常,通过apache就不行。
 楼主| 发表于 2005-7-8 19:08:44 | 显示全部楼层
apache access log内容
[code:1]210.75.18.36 - - [08/Jul/2005:18:52:02 +0800] "GET / HTTP/1.0" 200 130   #访问虚拟主机正常
210.75.18.36 - - [08/Jul/2005:18:55:42 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:55:54 +0800] "GET / HTTP/1.0" 200 126
210.75.18.36 - - [08/Jul/2005:18:56:16 +0800] "GET /abc HTTP/1.0" 301 340   #访问虚拟主机下的虚拟目录就出问题,jsp无法解析
210.75.18.36 - - [08/Jul/2005:18:56:16 +0800] "GET /abc/ HTTP/1.0" 200 200
210.75.18.36 - - [08/Jul/2005:18:56:36 +0800] "GET /abc/ HTTP/1.0" 304 -
210.75.18.36 - - [08/Jul/2005:18:56:39 +0800] "GET /efg/ HTTP/1.0" 200 200
210.75.18.36 - - [08/Jul/2005:18:56:43 +0800] "GET /sf HTTP/1.0" 301 339
210.75.18.36 - - [08/Jul/2005:18:56:44 +0800] "GET /sf/ HTTP/1.0" 304 -
210.75.18.36 - - [08/Jul/2005:18:56:44 +0800] "GET /sf/ HTTP/1.0" 304 -
210.75.18.36 - - [08/Jul/2005:18:56:58 +0800] "GET /qwe HTTP/1.0" 301 340
210.75.18.36 - - [08/Jul/2005:18:56:58 +0800] "GET /qwe/ HTTP/1.0" 403 308
210.75.18.36 - - [08/Jul/2005:18:57:02 +0800] "GET /qwe/test.jsp HTTP/1.0" 304 -
[/code:1]

tomcat access log内容 ,tomcat没有收到虚拟目录的jsp解析请求,只收到虚拟主机的jsp解析请求
[code:1]210.75.18.36 - - [08/Jul/2005:18:39:58 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:39:58 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:39:58 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:39:58 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:39:58 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:39:58 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:39:58 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:39:58 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:39:58 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:39:59 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:52:02 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:55:42 +0800] "GET / HTTP/1.0" 200 130
210.75.18.36 - - [08/Jul/2005:18:55:56 +0800] "GET / HTTP/1.0" 200 126
[/code:1]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-5 19:01 , Processed in 0.043850 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表