【问题标题】:Httpd maintenance pageHttpd维护页面
【发布时间】:2022-01-02 23:01:59
【问题描述】:

我正在尝试为我们的应用程序创建维护页面

前端服务器是服务器版本: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]`

这似乎不起作用。

有人知道吗?

提前致谢!

【问题讨论】:

    标签: apache maintenance


    【解决方案1】:

    只需将临时重定向添加到 Apache 配置文件以设置为维护模式

    Redirect / http://www.example.com/maintenance/index.html
    

    要退出维护模式,只需添加井号

    # Redirect / http://www.example.com/maintenance/index.html
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-02-03
      • 2018-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-15
      • 2011-02-02
      • 2011-11-26
      相关资源
      最近更新 更多