Skip to content

Instantly share code, notes, and snippets.

@gene1wood
Last active August 29, 2015 13:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gene1wood/9012217 to your computer and use it in GitHub Desktop.
Apache config to serve a maintenance page
<VirtualHost 204.246.122.74:80>
ServerAdmin root@localhost
DocumentRoot "/var/www"
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} !=503
RewriteRule ^(.*)$ /$1 [R=503,L]
ErrorDocument 503 /maint.html
Alias /maint.html /var/www/html/maint.html
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" with-vhost
CustomLog logs/maint_access_log with-vhost
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment