From 2d417f366140191c709474a67064d2f478f5799e Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 23 Nov 2020 23:23:50 +0100 Subject: [PATCH] docs: Add network example to bind directive (#99) --- src/docs/markdown/caddyfile/directives/bind.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/docs/markdown/caddyfile/directives/bind.md b/src/docs/markdown/caddyfile/directives/bind.md index b037df0..142626f 100644 --- a/src/docs/markdown/caddyfile/directives/bind.md +++ b/src/docs/markdown/caddyfile/directives/bind.md @@ -8,6 +8,8 @@ bind overrides the interface to which the server's socket should bind. Normally, Note that binding sites inconsistently may result in unintended consequences. For example, if two sites on the same port resolve to 127.0.0.1 and only one of those sites is configured with `bind 127.0.0.1`, then only one site will be accessible since the other will bind to the port without a specific host; the OS will choose the more specific matching socket. (Virtual hosts are not shared across different listeners.) +bind also accepts an optional network name: `/`. + ## Syntax @@ -31,3 +33,9 @@ To include IPv6: ```caddy-d bind 127.0.0.1 ::1 ``` + +To bind to a Unix domain socket at `/run/caddy`: + +```caddy-d +bind unix//run/caddy +```