I am trying to create a maintenance page for our application.
The front server is
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
The maintenance page is under following directory:
/var/www/maintenance/index.html
I am configuring the ssl.conf file as below
# 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]`
This seems like it's not working.
Does anyone have any idea?
just add a temporary redirect to Apache configuration file to set into maintenance mode
to take out of maintenance mode just add hash symbol