0
我有一個Apache的應用程序顯示與tomcat,我想顯示一些信息從Apache而不是tomcat更高效。所以我用httpd.conf
文件播放,這裏是我的conf文件的一部分:Apache的顯示信息,而不是tomcat
<VirtualHost info.com:80>
LimitRequestFieldSize 32768
ServerName info.com
ServerRoot "E:/Inetpub/Int/catalina_int/Apache2.2"
DocumentRoot "E:/Inetpub/Int/catalina_int/Apache2.2/htdocs"
SetEnvIf Request_URI "/app/*.cache.html" no-jk
<Directory />
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "E:/Inetpub/Int/catalina_int/kerberos-tomcat-6.0.26/webapps/appWeb">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "E:/Inetpub/Int/catalina_int/kerberos-tomcat-6.0.26/webapps/appWeb/app">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
RewriteLog "E:/Inetpub/Int/catalina_int/Apache2.2/logs/apache.rewrite.log"
JkMount /* appweb
JkUnMount /appWeb/app/*.cache.html appweb
JkUnMount /appWeb/app/resources/flash/* appweb
JkUnMount /appWeb/app/resources/flash_en/* appweb
在日誌的Apache,有錯誤時404阿帕奇嘗試加載一個文件* .cache html的。 該文件存在且路徑正確。 我做錯了什麼?
編輯:謝謝你的迴應Amblyopus。你是對的,這不是我想要做的。實際上,我能夠通過將DocumentRoot直接指向tomcat的webapps,刪除和僅使用JkMount來解決我的問題。
<VirtualHost info.com:80>
LimitRequestFieldSize 32768
ServerName info.com
ServerRoot "E:/Inetpub/Int/catalina_int/Apache2.2"
DocumentRoot "E:/Inetpub/Int/catalina_int/kerberos-tomcat-6.0.26/webapps"
RewriteLog "E:/Inetpub/Int/catalina_int/Apache2.2/logs/apache.rewrite.log"
JkMount /appWeb/app/*.jsp appweb
JkMount /appWeb/app/*Service appweb #servlet
</VirtualHost>