toulax-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jul-01 05:22 UTC
Help with capistrano and nginx
I''m using nginx with capistrano to deploy my Rails app and I''m having a hard time getting the maintenance capistrano task (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''s what I have so far on nginx.conf: if (-f $document_root/public/maintenance-on.html) { rewrite ^(.*)$ /maintenance-on.html last; break; } How could I make this not match urls containing /stylesheets/ and / images/? Thanks in advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
this question would probably be best answered on the deployment forum. here u go: http://www.ruby-forum.com/forum/23 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
toulax-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jul-02 06:47 UTC
Re: Help with capistrano and nginx
Thanks, but the group seems kinda dead. None else has a similar problem? On Jul 1, 4:44 am, Shai Rosenfeld <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> this question would probably be best answered on the deployment forum. > here u go: > > http://www.ruby-forum.com/forum/23 > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Not sure if this helps at all, but taking a shot in the dark (I didn''t read your original post): http://blog.mcconnachie.ca/2007/5/28/capistrano-nginx-and-mongrel-cluster-deployment Cheers, Walter On 7/2/07, toulax-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <toulax-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Thanks, but the group seems kinda dead. None else has a similar > problem? > > On Jul 1, 4:44 am, Shai Rosenfeld <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > this question would probably be best answered on the deployment forum. > > here u go: > > > > http://www.ruby-forum.com/forum/23 > > > > -- > > Posted viahttp://www.ruby-forum.com/. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
toulax-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jul-02 10:06 UTC
Re: Help with capistrano and nginx
Not really what I''m looking for. I''m starting to think there''s no way to do this, hasn''t anybody ever wanted to add images to their maintenance pages? On Jul 2, 5:41 am, "Walter McGinnis" <walter.mcgin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Not sure if this helps at all, but taking a shot in the dark (I didn''t read > your original post):http://blog.mcconnachie.ca/2007/5/28/capistrano-nginx-and-mongrel-clu... > > Cheers, > Walter > > On 7/2/07, tou...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <tou...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Thanks, but the group seems kinda dead. None else has a similar > > problem? > > > On Jul 1, 4:44 am, Shai Rosenfeld <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > > > this question would probably be best answered on the deployment forum. > > > here u go: > > > >http://www.ruby-forum.com/forum/23 > > > > -- > > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> > How could I make this not match urls containing /stylesheets/ and / > images/?will modifiying the matching regexp work?> if (-f $document_root/public/maintenance-on.html) {instead of> rewrite ^(.*)$ /maintenance-on.html last;# UNTESTED rewrite ^([^(stylesheets|images)]*)$> break; > }or something like that... ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
toulax-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jul-02 20:47 UTC
Re: Help with capistrano and nginx
Thanks, working on the regexp would probably work. In this case it almost worked, the maintenance is displayed on the index, and the images work, but other internal pages still show up. Any ideas? On Jul 2, 8:22 am, Shai Rosenfeld <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > How could I make this not match urls containing /stylesheets/ and / > > images/? > > will modifiying the matching regexp work? > > > > > if (-f $document_root/public/maintenance-on.html) { > instead of > > rewrite ^(.*)$ /maintenance-on.html last; > > # UNTESTED > rewrite ^([^(stylesheets|images)]*)$ > > > break; > > } > > or something like that... > ? > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---