Your approach seems correct.
Make sure the File exists rule is final, though. Probably it is a minor configuration issue that is messing things up. I would recommend using CHEROKEE_TRACE [1] (which requires cherokee to be compiled with special flags) to be able to troubleshoot exactly how the server is performing the matches.

Good luck!

[1]: http://www.cherokee-project.com/doc/dev_debug.html


On 07/01/11 05:37, Etienne Desautels wrote:
Hi,

I'm trying to configure the rules of a virtual server to serve static files 
from a directory, but if the file requested doesn't exist I want the request to 
be pass to my Django app.

Currently I have a virtual server with my default rule as uWSGI serving Django 
and 2 Directories rule serving Static Content for the media and the Django 
admin media. All that is working.

I tried to add another rule on top of that of type File exists set to match any 
files with a List&  Send Handler with a Document Root pointing to the directory 
where my static site is. But all requests are still sent to Django?

Default root: /www/media/
Root of static site: /www/static/

For example, If I have theses files in my static/ directory:
index.html
test.html
public/index.html
private/

I want theses URL to serve the corresponding static files:
http://mysite.com/index.html
http://mysite.com/test.html
http://mysite.com/public/index.html
http://mysite.com/public

And theses URL served by Django:
http://mysite.com/other
http://mysite.com/private/
http://mysite.com/some.html

  Is it possible? How can I achieve that?

Thanks

Etienne

_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee


--
[email protected]
http://unixwars.com/

_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to