wordpress - varnish 4.0 VCL error : Running VCC-compiler failed -


i use varnish 4.0, , following these operations,

vi /etc/varnish/default.vcl

# drop cookies sent wordpress. sub vcl_recv {      if ((req.url ~! "wp- (login | admin)")) {          unset req.http.cookie;      } }  # drop cookies wordpress tries send client. sub vcl_backend_response {      if ((req.url ~! "wp- (login | admin)")) {          unset beresp.http.set-cookie;      } } 

i /etc/init.d/varnish restart when executing command

got error message.

message vcc-compiler: syntax error @ ('input' line 33 pos 1)     if (!(req.url ~ "wp-(login|admin)")) { #-------------------------------------------  running vcc-compiler failed, exited 2  vcl compilation failed  * syntax check failed, not restarting 

so,how solve problem?

thanks!

as documentation says:

req.* not available in vcl_backend_response

req.* used available in vcl_fetch, after split of functionality, have 'bereq.*' in vcl_backend_response.


Comments

Popular posts from this blog

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -