Apache在没有tomcat的情况下访问静态html

时间:2015-12-24 08:05:32

标签: apache tomcat

在我们的维护窗口期间,我们关闭tomcat服务并启动ApacheFacade服务,该服务将请求重定向到维护页面schedule.html,这是一个静态HTML。以下是ApacheFacade服务中的重写规则

<Directory "C:/DC/SampleApp/ApacheFacade/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

RewriteRule  !^/ScheduledMaintenance/(.*)$ /ScheduledMaintenance/schedule.html  [R=301,L]
RewriteRule ^/(javascripts|stylesheets|images|help|yui)/(.*) /SampleApp/SD3/$1/$2 [R,L]
RewriteRule  ^/$  /ScheduledMaintenance/schedule.html  [R=301,L]
ProxyPass /SampleApp ajp://127.0.0.1:8009/SampleApp
ProxyPassReverse /SampleApp ajp://127.0.0.1:8009/SampleApp

当我关闭tomcat并打开ApacheFacade服务请求转到https://localhost/CPScheduledMaintenance/schedule.html但是它没有加载页面并看到以下回复

The requested URL /ScheduledMaintenance/schedule.html was not found on this server. 

schedule.html位于我的根级别的Web应用程序目录中 有人可以帮帮我吗?

1 个答案:

答案 0 :(得分:0)

ScheduledMaintenance下创建了C:/DC/SampleApp/ApacheFacade/htdocs目录,并将schedule.html复制到ScheduledMaintenance目录