Purge isn’t working on either of my Varnish boxes. The request is getting there, but it’s not being actioned:
11 RxRequest c PURGE
11 RxURL c /.*
11 RxProtocol c HTTP/1.0
11 RxHeader c Host: dev.example.co.uk
11 RxHeader c User-agent: WordPress/4.1; https://dev.example.co.uk
11 RxHeader c X-Purge-Method: regex
11 RxHeader c Accept-Encoding: deflate;q=1.0, compress;q=0.5, gzip;q=0.5
11 VCL_call c recv
11 VCL_acl c NO_MATCH purge
11 VCL_return c error
11 VCL_call c hash
11 Hash c /.*
11 Hash c dev.example.co.uk
11 VCL_return c hash
11 VCL_call c error deliver
11 VCL_call c deliver deliver
11 TxProtocol c HTTP/1.1
11 TxStatus c 405
11 TxResponse c Not allowed.
11 TxHeader c Server: Varnish
11 TxHeader c Content-Type: text/html; charset=utf-8
11 TxHeader c Retry-After: 5
11 TxHeader c Content-Length: 397
11 TxHeader c Accept-Ranges: bytes
11 TxHeader c Date: Wed, 21 Jan 2015 20:52:35 GMT
11 TxHeader c X-Varnish: 140119601
11 TxHeader c Age: 0
11 TxHeader c Via: 1.1 varnish
11 TxHeader c Connection: close
Any help would be greatly appreciated.
Thanks
]]>The action to add the Adminbar Button is commented out.
Also this peace of code looks like an impossible match:
// Build a varniship
if ( !defined( 'VHP_VARNISH_IP' ) && VHP_VARNISH_IP ) {
$varniship = get_option('vhp_varnish_ip');
} else {
$varniship = VHP_VARNISH_IP;
}
If it’s not defined, AND true — returns false. The else statement will be filled with an undefined value.
]]>