Running Two varnishncsa Instances using Systemd : looking for best practice

Yassine Aouadi yassine.aouadi90 at
Wed Jan 29 15:07:36 UTC 2020

Hello ,

I Would like to Split my Varnish logs into   access log and error log file

I Know I can reach my goal   by command line using   varnishncsa :

*usr/bin/varnishncsa  -c -b -a -w /var/log/varnish/access-varnishncsa.log
-D  -f /etc/varnish/varnishncsa_logmatic.format -q 'RespStatus < 400' &&
 /usr/bin/varnishncsa  -c -b -a -w /var/log/varnish/error-varnishncsa.log
-D  -f /etc/varnish/varnishncsa_logmatic.format -q 'RespStatus > 399'*

I am looking now to edit my varnishncsa unit file so i can do the same
using systemd :

This is my actual  unit file with one Varnishncsa instance :

*[Unit]Description=Varnish HTTP accelerator log
 -c -b -a -w /var/log/varnish/access-varnishncsa.log -D  -f
/etc/varnish/varnishncsa_logmatic.formatExecReload=/bin/kill -HUP


What is the best practice to do so ?
Can I use the same  one unit file  and use a one shot exec start ? Or
should I split unit files and run two different systemd varnishncsa
services (instances)?


Yassine Aouadi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list