Skip to content

Commit 53f1e63

Browse files
authored
Merge pull request #21 from masterful/patch-1
Explain multiple hostname possibility
2 parents f0b28e9 + 6658148 commit 53f1e63

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,16 @@ For now the available parameters are limited to things needed to make a nginx re
6161

6262
```go
6363
type Container struct {
64+
Name string // first host (space delimited) in VIRTUAL_HOST
6465
Host string // VIRTUAL_HOST environment variable
6566
Port string
6667
Address string
6768
Env map[string]string
6869
}
6970
```
7071

72+
**Note:** The Host field can contain more than one (space delimited) hostname - this is to allow for tasks to respond to more than one hostname (for instance, `example.com` and `www.example.com`). If using the nginx template, using the VIRTUAL_HOST string `example.com www.example.com` would result in a single upstream definition for `example.com`, and a server_name of `example.com www.example.com`, so that nginx responds to both (an advanced use case would be to use a regex definition for the second hostname).
73+
7174
## TODO
7275
* Expose more information
7376
* Expose VIRTUAL_HOST under environment variables instead of `Host`

0 commit comments

Comments
 (0)