or you can also put your pictures and css on a different server ;)
I struggled with this for too many hours and couldn't make it work.. not 
even with the xample from Eli.. The problem was that assets were 
requested from a rul that wasn't exact (one level above etc. - depending 
on what the original request was).. Maybe I should try again, but for 
now I'm happy with my stupid solution.

Eli Miller wrote:
> [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 rubyonrails-deployment@googlegroups.com
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