I'm running Amazon Linux.
I originally installed Varnish 3 on this box, but have now installed Varnish 4.
sudo varnishd -a 0.0.0.0:80 -f /etc/varnish/default.vcl
…works just fine to start Varnish 4, and
pkill varnishd
…works fine to kill it.
But
service varnish stop
appears to control Varnish 3, and not Varnish 4. I'm very confused!
Why is this? What can I do to help this box forget about Varnish 3?
Best Answer
if you'd like to use
service
to stopVarnish
, you should also use sameservice
to startVarnish
as well, and not running it manually like you do.if you need to update your script, use either
whereis
orwhich
to find where your binary is, then make sure that your init script points to same place as what you found:and that's all assuming you're using RHEL6, as for RHEL7
Varnish
comes withsystemd
script:also, unless there is an actual need, i don't think it's good idea to have both of them installed on same system.