Using Varnish with multiple vhosts
You may setup different VCL configurations for your environments.

It can be easily done with wrapping them by host condition:

sub vcl_recv {
if (req.http.Host ~ "^example.com")
 {
 ...
  if (req.url ~ "^/something") {
   return(pass);
  }
 ...
}
}


Please, take a look on my blog post http://blog.tenya.me/blog/2011/12/19/varnish-simple-virtual-hosts/, it describes how to do configuration separation.