Ban a URL in Varnish 4
varnish> ban req.url == "/pages" varnish> ban req.http.host == "linkedlist.org" && req.url == "/pages"
The operator can be one of
!= and the field can be anything accessible on
Ban Based on Content Type
ban obj.http.content-type ~ html
Ban Based on Host & Content Type
ban req.http.host == "linkedlist.org" && obj.http.content-type ~ html
List Names of Running Varnish Processes
Log Requests Matching URL
varnishlog -g request -q 'ReqURL eq "/"'
varnishlog -g request -q 'ReqURL ~ "something"'
Log Requests for Specific IPs
The first one is for when there is a proxy in front of Varnish (E.g. HTTPS terminator).
varnishlog -c -m RxHeader:'X-Forwarded-For:.*188.8.131.52.*' varnishlog -c -m ReqStart:'184.108.40.206'
Last modified: 12 Jan 2016