Topic: Apache2, Passenger, Caching

Could someone recommend a tutorial for this? I can only find tutorials that covers parts of the setup.

My Rails application exists in:
/home/bjerre/sites/railsdemo1

The cached files exists in (and yes there is cached content in this location):
/home/bjerre/sites/railsdemo1/public/cache

Right now I have this in my .htaccess :
<ifmodule mod_rewrite.c>
  RewriteEngine On

  RewriteCond %{REQUEST_METHOD} ^GET$
  RewriteCond %{DOCUMENT_ROOT}/cache%{REQUEST_URI} -s
  RewriteRule (.*\.jpg)$ /cache/$1 [L]
</ifmodule>

I have enabled rewritelog. The rewritelog does not mention any controller/action/id requests, only images, javascripts and stylesheets. I have log level 9. If I, for example, do "wget http://railsdemo1/" the Rewritelog will not contain any information on the request at all.

Any suggestions are welcome smile

EDIT: If I put cached content directly in /public and remove any rewrites, everything works fine.

Last edited by bjerre (2009-10-11 08:32:03)