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?
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 thebackend
declaration. Or by using the-b
argument invarnishd
.Varnish itself can listen on a UDS using the
-a
argument when startingvarnishd