Skip to content

Commit

Permalink
Add example for deploying a maintenance page
Browse files Browse the repository at this point in the history
Resolve #68
  • Loading branch information
vchendrix committed Jan 4, 2017
1 parent 6a5b383 commit c5df112
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
25 changes: 25 additions & 0 deletions maintenance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

<!DOCTYPE html>
<html>
<head>
<title>NGEE Tropics Archive Service -- Down For Maintenance</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
h1 { font-size: 50px; }
body { text-align:center; font: 20px Helvetica, sans-serif; color: #333; }
#email { color:darkgreen;font-weight:bold }
</style>
</head>
<body>
<h1> NGEE Tropics Archive Service</h1>
<h2>Down For Maintenance</h2>
<p>Sorry for the inconvenience, but we’re performing a maintenance at the moment.</p>
<p>We’ll be back online shortly!</p>
<p>For questions contact:
<span style="color:darkgreen;font-style:italic">
<span id="email">ngee-tropics-archive</span> at
<span id="email">googlegroups</span> dot
<span id="email">com</span>
</span></p>
</body>
</html>
10 changes: 10 additions & 0 deletions vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@
dest: /var/www/localhost/doi/index.html
tags:
- webserver
- name: Create /var/www/localhost/error
file: path=/var/www/localhost/error state=directory
tags:
- webserver
- name: Copy maintenance.html to location
copy:
src: maintenance.html
dest: /var/www/localhost/error/maintenance.html
tags:
- webserver
- name: Creates SSL certificate directory
file: path=/etc/apache2/ssl state=directory
tags:
Expand Down
3 changes: 3 additions & 0 deletions virtualhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ ServerTokens Prod
ProxyRequests off
SSLProxyEngine On
ProxyPreserveHost on
ProxyPass /error/ !
ProxyPass /doi/ !
ProxyPass /static/ !
ProxyPass / http://127.0.0.1:{{ http_port }}/
Expand All @@ -74,6 +75,8 @@ ServerTokens Prod
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

ErrorDocument 503 /error/maintenance.html

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
Expand Down

0 comments on commit c5df112

Please sign in to comment.