From 927e583f6a250903944bc5458814d4bc55833a6d Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Sun, 22 Feb 2015 11:19:33 -0800 Subject: [PATCH] Document custom config for multi-host VIRTUAL_HOST --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 40f8169..b074909 100644 --- a/README.md +++ b/README.md @@ -147,3 +147,8 @@ For example, if you have a virtual host named `app.example.com`, you could provi $ docker run -d -p 80:80 -p 443:443 -v /path/to/vhost.d:/etc/nginx/vhost.d:ro -v /var/run/docker.sock:/tmp/docker.sock jwilder/nginx-proxy $ { echo 'server_tokens off;'; echo 'client_max_body_size 100m;'; } > /path/to/vhost.d/app.example.com + +If you are using multiple hostnames for a single container (e.g. `VIRTUAL_HOST=example.com,www.example.com`), the virtual host configuration file must exist for each hostname. If you would like to use the same configuration for multiple virtual host names, you can use a symlink: + + $ { echo 'server_tokens off;'; echo 'client_max_body_size 100m;'; } > /path/to/vhost.d/www.example.com + $ ln -s www.example.com /path/to/vhost.d/example.com