Invalidate Varnish cache

1)   netstat -plnt 2)   varnishadm -T 127.0.0.1:6082 ban.url /wp-content/themes/catch-box -S /etc/varnish/secret   Will invalidate all content under  /wp-content/themes/catch-box.   nJoy  😛  

Allowing Apache to see client ip from Behind a trusted proxy.

With high speed caching based on nginx, varnish or CDNs in general the client ip gets lost. All IPs get reported as 127.0.0.1 since the proxy is making the socket request. Solution is two phased: 1) enable reporting the client IP to the X-Forwarded-For header at the proxy or CDN. This depends on the proxy will…

How to test varnish vcl file

Unlike most other configuration systems varnish went with a compiled configuration so if there is a mistake all you get is :   Starting varnish HTTP accelerator: [FAILED] To check what the problem is use the following : varnishd -C -f default.vcl varnishd -C -f default.vcl Message from VCC-compiler: Expected return action name. (input Line…