大家帮我看下这个apache的配置呢???
我在tomcat的server.xml中配置了2个上下文/usa和/china
下面是apache文件配置
XML code
访问路径
http://localhost/usa/fdg32-sdfs32-book/xinhua/12345678.html?wee=sfs&charge=dssgw
结果提示出错,error.log如下
[Tue Jan 18 17:54:17 2011] [error] [client 127.0.0.1] File does not exist: D:/tomcat-6.0.29/webapps/usa/fdg32-sdfs32-book
就是说apache没有映射成功,请问问题出在哪呀?
下面是apache文件配置
XML code
.httpd.conf文件===== DocumentRoot "D:/tomcat-6.0.29/webapps" <Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Deny from all </Directory> <Directory "D:/tomcat-6.0.29/webapps"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> mod_jk.conf文件===== LoadModule jk_module modules/mod_jk.so JkWorkersFile "conf.d/workers.properties" JkLogFile "logs/mod_jk.log" JkLogLevel info DirectoryIndex index.html index.htm index.jsp ErrorLog logs/shsc-error_log.txt CustomLog logs/shsc-access_log.txt common JkMount /*/servlet/* ajp13 JkMount /*.jsp ajp13 JkMount /*.do ajp13 Alias /usa "D:/tomcat-6.0.29/webapps/usa" Alias /china "D:/tomcat-6.0.29/webapps/china" .htaccess文件===== <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^([^/]+)/[^/]+-books/xinhua/(\d+).html$ $1/online/getBook.jsp?book_id=$2&%1 [L] </IfModule>
访问路径
http://localhost/usa/fdg32-sdfs32-book/xinhua/12345678.html?wee=sfs&charge=dssgw
结果提示出错,error.log如下
[Tue Jan 18 17:54:17 2011] [error] [client 127.0.0.1] File does not exist: D:/tomcat-6.0.29/webapps/usa/fdg32-sdfs32-book
就是说apache没有映射成功,请问问题出在哪呀?
作者: askquestion_0001 发布时间: 2011-01-18
$1/online/getBook.jsp?book_id=$2&%1中的
%1就是我的上下文路径,也就是说可能是http://localhost/usa/*****或者http://localhost/china/*****
总之我的需求就是要灵活应对tomcat的server.xml中配置的多个上下文。(不用apache的情况下,所有资源访问一切正常)
%1就是我的上下文路径,也就是说可能是http://localhost/usa/*****或者http://localhost/china/*****
总之我的需求就是要灵活应对tomcat的server.xml中配置的多个上下文。(不用apache的情况下,所有资源访问一切正常)
作者: askquestion_0001 发布时间: 2011-01-18