Skip to content

Instantly share code, notes, and snippets.

@czerasz
Created October 1, 2012 15:03
Show Gist options
  • Save czerasz/3812317 to your computer and use it in GitHub Desktop.
Save czerasz/3812317 to your computer and use it in GitHub Desktop.
varnish commands
# https://www.varnish-software.com/static/book/Getting_started.html#varnishlog
# View requests which are comming from the user to varnish
varnishlog -c -i RxURL
# View requests which are going from varnish to the backend
varnishlog -b -i TxURL
# BAN many objects at once - remember to implement the ban functionality in the /etc/varnish/default.vcl
curl -X BAN -H 'Host: some.host.net' 'http://localhost:80/url/.*'
# Check if the ban was propagated
varnishlog -c -m RxRequest:BAN -i RxRequest,RxURL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment