Welcome Guest | Login

cap deploy:web:disable with mongrel

My app is deployed with mongrels.

Running cap deploy:web:disable, generates a file public/system/maintenance.html

How do a direct all requests to the site to this page?

I've tried a number of rewrites in .htaccess (found googling), both with and without mongrel running, such as

RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(css|jpg|png)$
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]

When mogrels running, the site is live (.htaccess is ignored)
But when i stop the mongrels, I get a generic 503 message

Whats the correct way to do this?

2008-09-04 03:44 PM

If you are running your application on mongrel, your .htaccess file will be ignored. You need to contact support team for setting up the rewrite rules in the Apache configuration file.

2008-09-04 05:26 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.