我正在尝试为我们的应用程序创建一个维护页面
前端服务器为服务器版本: Apache/2.4.6 (Red Hat Enterprise Linux)维护页面位于以下目录下: /var/www/ maintenance /index.html
我正在按如下方式配置ssl.conf文件
# Redirect all request to a 503 return code when in maintenance mode
ErrorDocument 503 /maintenance/index.html
RewriteEngine on
RewriteCond /var/www/maintenance/ALL -f [OR]
RewriteCond /var/www/maintenance/%{SERVER_NAME} -f
RewriteCond %{REQUEST_URI} !=/maintenance/index.html
RewriteRule ^ - [R=503,L]
# Redirect away from the maintenance page if not in maintenance mode
RewriteCond /apps/myApp/maintenance/ALL !-f
RewriteCond /apps/myApp/maintenance/%{SERVER_NAME} !-f
RewriteRule ^/maintenance/index.html$ / [R,L]`这似乎不起作用。
有谁知道吗?
提前感谢!
发布于 2021-11-24 16:06:34
只需添加到Apache配置文件的临时重定向,即可设置为维护模式
Redirect / http://www.example.com/maintenance/index.html要退出维护模式,只需添加散列符号
# Redirect / http://www.example.com/maintenance/index.htmlhttps://stackoverflow.com/questions/70098061
复制相似问题