Yep Steve, You're absolutely right. I certainly can do it like that. I'm just dumbfounded why I didn't 'see' this obviously easier path.
So much for my 'reason' :) In any case, I think David Vrensk brought up a very valid point about mongrel not serving static files at all. Thanks everyone for your feedback. Regards, Saimon On Jan 25, 2008, at 6:42 PM, Steve Midgley wrote: > At 08:09 AM 1/25/2008, [EMAIL PROTECTED] wrote: >> Date: Fri, 25 Jan 2008 17:09:06 +0100 >> From: Saimon Moore <[EMAIL PROTECTED]> >> Subject: Re: [Mongrel] #17446 [PATCH] Add option >> to mongrel_rails to >> force mongrel not to serve static files >> To: mongrel-users@rubyforge.org >> >> Yep,you got it. >> >> Since I sent in the ticket I had been thinking about the possibility >> to write a custom mongrel handler (And in fact I'll probably do it) >> but I still think that this patch is of value. If only, to avoid >> people having to write their own custom handlers for each use case >> (though I can't think of any others right now). >> >> Also mongrel_rails is a custom mongrel handler of sorts, so I guess >> I >> see it as just a patch on that. >> >> But I can live with writing a custon mongrel handler, I just thought >> this tiny patch may come in handy (and save them some time) for >> others >> when confronted with the same problem. >> >> Regards, >> >> Saimon > > Hi Saimon, > > Maybe I'm totally missing the boat here, but couldn't you solve this > on > the Rails end instead? David Vrensk approached this point in his reply > but maybe I can extend it a bit. > > Couldn't you configure your Rails app to become "cache-folder- > specific" > depending on your language locale? So at the top of your Rails app you > detect what language you're in (based on the incoming site, the route > or whatever else) and you set your root caching folder appropriately > from within Rails? So instead of having a default page cache be > written > into: > > [rails_root]/public > > and a spanish cache written to > > [rails_root]/public/es > > Why not move the default page cache to (assuming en is default): > > [rails_root]/public/en > > That way, Mongrel will never find "index.html" in your public root and > so will just not interfere? You just program nginx to look in > "[rails_root]/public/en" for your default "www.site.com" hosts and to > "../public/es" for "es.site.com" - etc.. > > Am I missing something? I usually am. :) I hope this helps anyway. > > Steve > > p.s. I don't think your ideas for a Mongrel patch are wrong in any > way, > but I'm just wondering if you can solve this with nginx.conf and Rails > and leave the Mongrel container out of it completely? > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users -- Saimon Moore Freelance Web Developer (Available for hire - For details visit http://saimonmoore.net) Skype: saimonmoore Yahoo IM: saimonmoore Google IM: saimonmoore _______________________________________________ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users