I want to use varnish to server static files directly from django, just for benchmarking purposes.
Does varnish support serving static files directly from filesystem?
I'm actually looking for nginx's equivalent "alias" command:
location /media {
alias /var/www/djangosite/media;
}
no varnish is a reverse proxy. You sit it in front of say nginx and tell it to cache search file types or pages that have a response header and how to cache it.
Maybe I'm not understanding your question, but I think what you want to do is pass() certain static file types straight through Varnish to your backend (Nginx, Apache, etc).
We're doing something like that with a static image files that we do not ever want cached using this in VCL_recv():
Is that what you're looking for?