dot-files/apache/etc/httpd/conf.d/virtualhost-example.apacheconf

19 lines
641 B
ApacheConf

<VirtualHost *:443>
# YOUR CONFIG
# 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
RewriteCond %{REQUEST_URI} !=/maintenance/index.png
RewriteRule ^ - [R=503,L]
# Redirect away from the maintenance page if not in maintenance mode
RewriteCond /var/www/maintenance/ALL !-f
RewriteCond /var/www/maintenance/%{SERVER_NAME} !-f
RewriteRule ^/maintenance/index.html$ / [R,L]
</VirtualHost>