feature: add apache example maintenance configuration
This commit is contained in:
parent
78b109cbfc
commit
03c587fcac
3 changed files with 35 additions and 0 deletions
15
apache/maintenance.conf
Normal file
15
apache/maintenance.conf
Normal 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
20
apache/maintenance.html
Normal 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’ll be back soon!</h1>
|
||||||
|
<div>
|
||||||
|
<p>We’re performing some hacks at the moment.
|
||||||
|
<br>You can always <a href="mailto:info@unitoo.pw">contact us</a>!</p>
|
||||||
|
<p>— Your best friend 😎</p>
|
||||||
|
</div>
|
||||||
|
</article>
|
BIN
apache/maintenance.png
Normal file
BIN
apache/maintenance.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
Loading…
Reference in a new issue