[EMAIL PROTECTED] wrote:
> (deploy:web:disable) to work like I want. I want nginx to redirect all
> requests to public/maintenance-on.html if the file exists, however,
> since I use stylesheets and images on this file, nginx should serve
> them.

Here is a solution I've used before:

  if (-f $document_root/system/maintenance.html) {
    set $maintenance 1;
  }
  if ($request_uri ~* (jpg|jpeg|gif|js|css)$) {
    set $maintenance 0;
  }
  if ($maintenance) {
    rewrite  ^(.*)$  /system/maintenance.html last;
    break;
  }

You can change the regex that $request_uri is matched against to match 
your site quite easily.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to