[Mongrel] #17446 [PATCH] Add option to mongrel_rails to force mongrel not to serve static files

David Vrensk david at vrensk.com
Fri Jan 25 11:01:51 EST 2008


Saimon,

I think you were clear enough the first time, and I don't think anyone can
have missed your point now.

I think your patch is a good idea, and not only because it solves your
problem.  As Zed has pointed out very succinctly a few times, having the app
container serve files is a bad, bad, bad idea.  I daresay that most of us
don't let it do that, or at least we intend to not let it do that, but we
might have made a mistake somewhere.  Now, if your patch was accepted, I
would certainly upgrade my production mongrel configurations to say "do not
serve files", and if I had made a mistake somewhere, I would find out soon
enough.  Fail early, as the Prags would say.

That being said, I haven't checked your actual implementation, so I cannot
vouch for it (as if I could anyway).  But I think it should be (possibly
rewritten and) included in trunk.

Also, there may be another solution to your problem, but I think it's silly:
instead of having the root for example.com be /public, make it /public/com.
Then make your app always use a sub-directory for the generated files.  I
bet it would work, but I like that patch approach better.

Best regards,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20080125/ee17bf04/attachment.html 


More information about the Mongrel-users mailing list