For nginx, try something like this,

error_page   503          /maintenance.html;

location /maintenance.html {

}

location / {
    if ( -f $document_root/system/maintenance.html ) {
       return 503;
    }

    if (!-f $request_filename) {
       rewrite ^(.+)$ $uri break;
       proxy_pass http://mongrel_app;
   }
}

This is slightly different to the configuration that is out there for  
doing /maintenance.html because those return a 200 code in maintenance  
mode, which upsets paypal

Cheers

Dave

On 01/04/2008, at 5:33 AM, Kirk Haines wrote:

> On Mon, Mar 31, 2008 at 10:34 AM, Nate Vack <[EMAIL PROTECTED]> wrote:
>> You'd probably ask Apache / ngnix to do that, actually, via some
>> mod_rewrite-fu I can't muster this morning :/
>>
>> Cheers,
>> -Nate
>>
>>
>> On Mon, Mar 31, 2008 at 11:28 AM, James Testa <[EMAIL PROTECTED] 
>> forum.com> wrote:
>>> Does someone know how to tell mongrel_rails to read the
>>> public/system/maintenance.html file?
>
> Generally, yes.
>
> If you are doing some sort of maintenance, you probably want that
> served at the highest level possible.  i.e. at the web server level.
>
> Swiftiply w/ rewrite support (totally experimental, but will probably
> end up in a release soon)
>
> :rewrites:
> - :match: "*"
>  :sub: "/public/system/maintenance.html"
>
>
> Apache:
>
> RewriteEngine On
> RewriteRule * /public/system/maintenance.html
> (or something similar; unless you do it a lot, always check the
> rewrite rule docs when writing them)
>
>
>
> Kirk Haines
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to