Chris ecwh73@gmail.com wrote:
Is there a way to take down roundcube and notify the state to end users? I'd like to have a 'service down' page during backups for the early birds when they come in.
I use a different vhost-config which I enable while I do my maintenance.
It looks like this:
,----
| <IfModule mod_ssl.c>
| <VirtualHost *:443>
| ServerAdmin webmaster@example.com
| ServerName webmail.example.com
|
| DocumentRoot /srv/www/webmail.example.com-maint/
| <Directory />
| Options FollowSymLinks
| AllowOverride None
| </Directory>
| <Directory /srv/www/webmail.example.com/>
| Options Indexes FollowSymLinks MultiViews
| AllowOverride All
| Order allow,deny
| allow from all
| </Directory>
|
| ErrorLog ${APACHE_LOG_DIR}/webmail.example.com-maint-error.log
|
| LogLevel warn
|
| CustomLog ${APACHE_LOG_DIR}/webmail.example.com-maint-access.log combined
|
| ErrorDocument 404 /error.html
|
| SSLEngine on
|
| SSLCertificateFile /etc/ssl/certs/webmail.example.com.pem
| SSLCertificateKeyFile /etc/ssl/private/webmail.example.com.key
| SSLCertificateChainFile /etc/ssl/certs/webmail.example.com.pem
|
| <FilesMatch ".(cgi|shtml|phtml|php)$">
| SSLOptions +StdEnvVars
| </FilesMatch>
|
| BrowserMatch "MSIE [2-6]"
| nokeepalive ssl-unclean-shutdown
| downgrade-1.0 force-response-1.0
| BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
|
| </VirtualHost>
| </IfModule>
`----
The documentroot /srv/www/webmail.example.com-maint/ only contains the error.html and the needed CSS and JPG files. The ErrorDocument option redirects every access attempt to that error document.
It is important to do it this way and _not_ using any redirects, because the latter will poison the cache of the browser with "fake" HTTP-200 responses.
Grüße, Sven.