View Single Post
  #1  
Old 05-21-2009, 02:05 PM
ideaoforder ideaoforder is offline
Member
 
Join Date: Jul 2008
Posts: 28
Default Rails Subdomain Caching

Hello,

I'm running a Rails app that uses subdomains for accounts--so each subdomain needs its own cache. I have Rails setup to cache like so:

http://subdomain.myapp.com/ -> /public/cache/subdomain/

How do I setup Litespeed to serve these cached pages?

In nginx, this would look something like:

if (-f $document_root/cache/$host/$uri/index.html) {
rewrite .? /cache/$host/$uri/index.html break;
}

if (-f $document_root/cache/$host/$uri.html) {
rewrite .? /cache/$host/$uri.html break;
}

if (-f $document_root/cache/$host/$uri) {
rewrite .? /cache/$host/$uri break;
}

How would this look in Litespeed? And where would I go to change this setting?

Thanks!
Reply With Quote