feature: add apache example maintenance configuration

This commit is contained in:
Claudio Maradonna 2021-06-25 12:15:51 +02:00
parent 78b109cbfc
commit 03c587fcac
Signed by: claudiomaradonna
GPG key ID: B1EDCB4C3B05C387
3 changed files with 35 additions and 0 deletions

15
apache/maintenance.conf Normal file
View file

@ -0,0 +1,15 @@
<VirtualHost *:443>
# 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>

20
apache/maintenance.html Normal file
View file

@ -0,0 +1,20 @@
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 3rem; }
body { font: 1.5rem Helvetica, sans-serif; color: #333; }
article { display: block; text-align: middle; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
<article>
<img src="maintenance.png" height=270>
<h1>We&rsquo;ll be back soon!</h1>
<div>
<p>We&rsquo;re performing some hacks at the moment.
<br>You can always <a href="mailto:info@unitoo.pw">contact us</a>!</p>
<p>&mdash; Your best friend &#x1F60E</p>
</div>
</article>

BIN
apache/maintenance.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB