From 07f4c66ee952ec5b05426dd253e8b74d2fa9aaf3 Mon Sep 17 00:00:00 2001 From: "Kevin F. Konrad" Date: Fri, 22 Jun 2018 19:48:53 +0200 Subject: [PATCH] clarify default host usage --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 054b4d1..210ee7d 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,9 @@ To set the default host for nginx use the env var `DEFAULT_HOST=foo.bar.com` for $ docker run -d -p 80:80 -e DEFAULT_HOST=foo.bar.com -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy +nginx-proxy will then redirect all requests to a container where `VIRTUAL_HOST` is set to `DEFAULT_HOST`, if they don't match any (other) `VIRTUAL_HOST`. Using the example above requests without matching `VIRTUAL_HOST` will be redirected to a plain nginx instance after running the following command: + + $ docker run -d -e VIRTUAL_HOST=foo.bar.com nginx ### Separate Containers