User Tools

Site Tools


Maintenance Page


Create a maintenance page

  • Create a maintenance page and place it on the server

Create a new Apache config

  • Create a special httpd.conf called httpd.conf.maintenance
 cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.maintenance

Comment out Include conf.d directive

Change from…

# Load config files from the config directory "/etc/httpd/conf.d".
Include conf.d/*.conf


# Load config files from the config directory "/etc/httpd/conf.d".
#Include conf.d/*.conf

Insert the following two VHOSTS

  • This config is for a maintenance page named “index.html”. All request go to this site (404 directive)
# Maintenance Site
<VirtualHost *:80>
    DocumentRoot /srv/www/maintenance
    CustomLog logs/maintenance-access_log combined
    ErrorLog logs/maintenance-error_log
    ErrorDocument 404 /index.html
    <Directory /srv/www/maintenance/>
        Allow from all

Activate Maintenance Page

  • service httpd stop
  • httpd -f conf/httpd.conf.maintenance

Stop Maintenance Page and renable normal config

  • killall -9 httpd
  • service httpd start
/srv/ · Last modified: 2009/08/15 12:14 (external edit)