diff --git a/maintenance.html b/maintenance.html new file mode 100644 index 00000000..f928bfee --- /dev/null +++ b/maintenance.html @@ -0,0 +1,25 @@ + + + + + NGEE Tropics Archive Service -- Down For Maintenance + + + + +

NGEE Tropics Archive Service

+

Down For Maintenance

+

Sorry for the inconvenience, but we’re performing a maintenance at the moment.

+

We’ll be back online shortly!

+

For questions contact: + + ngee-tropics-archive at + googlegroups dot + com +

+ + \ No newline at end of file diff --git a/vagrant.yml b/vagrant.yml index 490faaa9..c34467f6 100644 --- a/vagrant.yml +++ b/vagrant.yml @@ -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: diff --git a/virtualhost.conf b/virtualhost.conf index 0695cc01..e1bfd67a 100644 --- a/virtualhost.conf +++ b/virtualhost.conf @@ -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 }}/ @@ -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