I am using Varnish 3 in front of nginx running multiple WordPress sites. I am using a default.vcl recommended and used by many large WordPress sites.
default.vcl: http://pastebin.com/KaSdvuRS
I am using W3 Total Cache which has an option to automatically purge when clearing the cache. I also tested installing Varnish HTTP Purge plugin to purge posts/pages when editing them. Neither seemed to work so I tested interactive session over ssh w/ curl.
I am logged into SSH on the varnish/nginx box, and I type the following command to test the varnish purge:
curl -X PURGE http://www.example.com
The result is:
<head>
<title>405 Not allowed.</title>
</head>
<body>
<h1>Error 405 Not allowed.</h1>
<p>Not allowed.</p>
<h3>Guru Meditation:</h3>
<p>XID: 265824636</p>
<hr>
<p>Varnish cache server</p>
</body>
Any ideas what I am missing? This vcl file is very similar to what is recommended by Varnish-Cache.org for WordPress and is the purge configuration I see recommended everywhere.