James Testa
2008-Mar-31 16:28 UTC
[Mongrel] how to get mongrel to use maintenance.html file?
Does someone know how to tell mongrel_rails to read the public/system/maintenance.html file? -- Posted via http://www.ruby-forum.com/.
Nate Vack
2008-Mar-31 16:34 UTC
[Mongrel] how to get mongrel to use maintenance.html file?
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 <lists at ruby-forum.com> wrote:> Does someone know how to tell mongrel_rails to read the > public/system/maintenance.html file? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Kirk Haines
2008-Mar-31 18:33 UTC
[Mongrel] how to get mongrel to use maintenance.html file?
On Mon, Mar 31, 2008 at 10:34 AM, Nate Vack <njvack at wisc.edu> 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 <lists at ruby-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
Dave Cheney
2008-Mar-31 21:47 UTC
[Mongrel] how to get mongrel to use maintenance.html file?
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 <njvack at wisc.edu>
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 <lists at ruby-
>> 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 at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users