[Mongrel] Moving page_cache_directory
rsl at swimcommunity.org
Tue Oct 31 14:27:26 EST 2006
Rick, that did the trick. Thank you so much!
On 10/31/06, Rick Olson <technoweenie at gmail.com> wrote:
> On 10/31/06, Russell Norris <rsl at swimcommunity.org> wrote:
> > Howdy. I'm working on a RoR CMS and need cached pages to all be in
> > public/cache rather than public [in order to set svn:ignore on all the
> > properly]. I can get page_cache_directory set correctly and the pages
> > cached in the right place but Mongrel isn't serving them because it's
> > looking for them in public. During development I know I can set -r
> > public/cache but doing that means that the images and stylesheets don't
> > picked up. I'm sure there's a way to tell Mongrel to look in both places
> > at least to serve assets from public and cached pages from public/cache.
> > Isn't there?
> > Thanks in advance.
> > RSL
> I would think that you could just set up a custom DirHandler, but the
> RailsHandler is taking up the root uri. I'm not sure this would work,
> but use a config script like this:
> uri "/", Mongrel::DirHandler.new("path/to/public/cache",
> listing_allowed=true, index_html="index.html"), :in_front => true
> (the 2nd and 3rd params of DirHandler.new are optional).
> I'm not sure if the DirHandler will return 404's or just pass on to
> the next handler in line, which would be the Rails Handler. If this
> doesn't work, you'll have to hack the RailsHandler probably.
> Rick Olson
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mongrel-users