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:.*18.104.22.168.*' varnishlog -c -m ReqStart:'22.214.171.124'
Last modified: 11 January 2016