Search code examples
linuxcachingamazon-ec2varnishvarnish-vcl

I am running open varnish image from docker hub on EC2 linux, how to enable varnish logging?


I have Default.vcl with host and port and copied to container varnish:/etc/varnish I am able to hit back end via varnish, but could not trace varnish logs using docker logs


Solution

  • Logs in Varnish are not produced by the main varnishd process.

    • You can either use the varnishlog binary to get in-depth logs
    • Or you can use the varnishncsa binary to get Apache-style logs

    You have to run either of these commands within your container, on the shell. Unfortunately this cannot be done through docker logs.