Skip to content

Commit

Permalink
Merge pull request nginx-proxy#926 from Paike/patch-1
Browse files Browse the repository at this point in the history
Fallback if container has no IP
  • Loading branch information
jwilder authored Jan 21, 2018
2 parents 3fab237 + 3156b97 commit 226bfe1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
{{ end }}
{{ else if .Network }}
# {{ .Container.Name }}
server {{ .Network.IP }} down;
{{ if .Network.IP }}
server {{ .Network.IP }} down;
{{ else }}
server 127.0.0.1 down;
{{ end }}
{{ end }}

{{ end }}

# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
Expand Down

0 comments on commit 226bfe1

Please sign in to comment.