[Mongrel] #17446 [PATCH] Add option to mongrel_rails to force mongrel not to serve static files
Nathan Vack
njvack at wisc.edu
Fri Jan 25 11:39:50 EST 2008
On Jan 25, 2008, at 9:34 AM, Saimon Moore wrote:
> Steps on 3rd request: http://es.example.com
>
> 1. WS: can't find index.html in /var/www/apps/example.com/public/es <=
> Note the doc root is different
> 2. WS forwards request to mongrel process (M)
> 3. M finds index.html in /var/www/apps/example.com/public
> 4. Mongrel serves /var/www/apps/example.com/public/index.html which is
> the page associated with the http://example.com domain.
> 5. This is NOT the required behaviour as it's serving the cached file
> for http://example.com rather than http://es.example.com as was
> requested.
Wait... my brain is still missing something; I apologize.
Why isn't nginx sending the stuff from es.example.com to
mongrel.example.com/es? You don't *need* to send your proxied
requests to mongrel's root... do you?
I guess you'd need to override the behavior of Rails's url_for() or
generate routes asymmetrically, which would suck.
My gut (as a non-devteam-member) is that you're doing something a
little strange, so a custom handler is more sane than patching a
switch onto Mongrel.
A more interesting proposal would be to say "Mongrel is ONLY an app
server and doesn't serve static files AT ALL" -- to make it do so
would require a custom handler. That, however, would be a Big Scary
Change (TM) and I think users would be... unhappy.
-Nate
More information about the Mongrel-users
mailing list