Tag Archives: varnish

varnish systemd 80 port


mkdir /etc/systemd/system/varnish.service.d
vim /etc/systemd/system/varnish.service.d/varnishd.conf

[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T 127.0.0.1:8081 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m

systemctl daemon-reload && systemctl start varnish

varnish can not change port

If you want to change to 8888:

grep -R 'ExecStart=/usr/sbin/varnishd' /etc/
/etc/systemd/system/multi-user.target.wants/varnish.service:ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :8888 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m

systemctl daemon-reload
systemctl restart varnish.service