banning in one line command
miguel_3_gonzalez at yahoo.es
Wed Feb 1 17:29:45 CET 2017
On 02/01/17 5:24 PM, Miguel González wrote:
> On 02/01/17 5:08 PM, Dridi Boukelmoune wrote:
>>> What do you mean with the actual output? I get an empty string...
>> For commands like param.show or backend.list that give you an output.
>>> Is there any manual or information about this in the wiki?
>> Please double check the varnishstat manual, if it's not mentioned let
>> me know and will push a docfix.
> you mean varnishadm manual, this one:
> My experience is that using a singleliner doesn´t work, cache is not
> banned. I thought It was the empty string output but considering your
> answer and the manual it supposedly works but it´s not actually banning
> the cache.
using quotes an after the example in the manual:
echo "ban req.http.host ~ myserver.com" | varnishadm -S /etc/varnish/secret
Before I was getting this error when not using commands for the echo
command (as showed in the example in the manual):
expected conditional (~, !~, == or !=) got "/root"
apparently this error is dued to the echo command and the use of
conditionals as ~
More information about the varnish-misc