I have tested this plugin with WP 3.1 and got it working with these settings:
- Get the latest version from github
clone git://github.com/pkhamre/wp-varnish.git
- Add these lines to /etc/varnish/default.vcl:
After backend definition
acl purge {
"localhost";
}
And inside sub vcl_recv
if (req.request == "PURGE") {
if(!client.ip ~ purge) {
error 405 "Not allowed.";
}
purge("req.url ~ ^" req.url "$ && req.http.host == "req.http.host);
}
- Activate plugin from WordPress admin panel