On 17.09.2008, at 21:56, sbtodd wrote:
> It took me awhile to try it .. since I had stuff to fix
>
> I noticed that capistrano uploads a maintenance page to shared,
> but NGINX keeps sending requests to Tiny which then runs the Rails
> stack ..
>
> so how do I tell NGINX to just go to that maintenance page?
>
Given that your root is pointing to /your/project/current/public, and
your maintenance file is put into shared/system, just throw in the
following into the corresponding server {} part
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html last;
break;
}
Best to put it before any proxying configuration, to ensure it will
run and break out of the request before it reaches your application.
Cheers, Mathias
--
http://paperplanes.de
http://twitter.com/roidrage
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---