大网数据广告活动
服务器运维问答

Does Varnish support unix domain socket files?

· 52CE 我爱测

Does varnish support unix socket files? I'd like to accelerate my website by adding a varnish reverse proxy (HTTP accelerator/cache) before my web server. My web server's virtual host is currently configured to listen for connect…

问题原文

原帖链接 · Michael Altfield · CC BY-SA 4.0

Does varnish support unix socket files?

I'd like to accelerate my website by adding a varnish reverse proxy (HTTP accelerator/cache) before my web server. My web server's virtual host is currently configured to listen for connections on a "UNIX-domain socket". For more info on this config, see the "path" argument for the "listen" directive in NGINX:

Is it possible for varnish to communicate to my existing nginx server's config over a unix domain socket file as its backend?

And is it possible for varnish to also itself listen on a domain socket?

已采纳解答

原帖链接 · Michael Altfield · CC BY-SA 4.0

Varnish has had support for Unix Domain Sockets (UDS) for both clients and backend servers since Varnish 6.0 was released in March 2018.

You can define a backend to use a UDS using the .path field in the backend declaration. Or by using the -b argument in varnishd.

Varnish itself can listen on a UDS using the -a argument when starting varnishd

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-03-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。