From 682914dec74b646621e54d9d66a469cdb642fb66 Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Sun, 23 Aug 2015 18:39:49 -0700 Subject: [PATCH] Document the need to EXPOSE the proxied port --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 060c82b..005e7a0 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ Then start any containers you want proxied with an env var `VIRTUAL_HOST=subdoma $ docker run -e VIRTUAL_HOST=foo.bar.com ... +The containers being proxied must [expose](https://docs.docker.com/reference/run/#expose-incoming-ports) the port to be proxied, either by using the `EXPOSE` directive in their `Dockerfile` or by using the `--expose` flag to `docker run` or `docker create`. + Provided your DNS is setup to forward foo.bar.com to the a host running nginx-proxy, the request will be routed to a container with the VIRTUAL_HOST env var set. If you are using `boot2docker` start `nginx-proxy` with: