[英]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我有带有主机和端口的 Default.vcl 并复制到容器清漆:/etc/varnish 我能够通过清漆打后端,但无法使用 docker 日志跟踪清漆日志
Logs in Varnish are not produced by the main varnishd
process. Varnish 中的日志不是由主
varnishd
进程生成的。
varnishlog
binary to get in-depth logsvarnishlog
二进制文件来获取深入的日志varnishncsa
binary to get Apache-style logsvarnishncsa
二进制文件来获取 Apache 风格的日志You have to run either of these commands within your container, on the shell.您必须在 shell 上的容器中运行这些命令中的任何一个。 Unfortunately this cannot be done through
docker logs
.不幸的是,这不能通过
docker logs
来完成。
Thijs's answer is correct, I would also recommend looking at the varnishncsa service in the package to understand how you can run it from the same container, and this blog post to understand what needs to be shared between the two containers if you decide to split them. Thijs 的回答是正确的,我还建议您查看package 中的 varnishncsa 服务,以了解如何从同一个容器中运行它,以及这篇博文以了解如果您决定拆分两个容器需要在两个容器之间共享什么.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.