Apache config to serve a maintenance page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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