This repository has been archived by the owner on Nov 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve default templates, mostly by adding ACLs
- Loading branch information
Showing
2 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
listen docker-{{ hostname }} | ||
bind *:443 interface eth0 | ||
bind *:80 interface eth0 | ||
mode http | ||
option forwardfor | ||
bind *:80 interface eth0 | ||
|
||
# SSL | ||
bind *:443 interface eth0 | ||
redirect scheme https code 301 if !{ ssl_fc } | ||
|
||
# Allow only requests for a valid FQDN | ||
acl is_{{ hostname }} hdr(host) -i "{{ hostname }}.${DOMAIN_NAME}" | ||
tcp-request content accept if is_{{ hostname }} | ||
tcp-request content reject | ||
|
||
option forwardfor | ||
server {{ hostname }} {{ ip }}:{{ target_port }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
listen docker-{{ hostname }} | ||
bind *:{{ source_port }} interface eth0 | ||
mode tcp | ||
bind *:{{ source_port }} interface eth0 | ||
|
||
# Allow only requests for a valid FQDN | ||
acl is_{{ hostname }} hdr(host) -i "{{ hostname }}.${DOMAIN_NAME}" | ||
tcp-request content accept if is_{{ hostname }} | ||
tcp-request content reject | ||
|
||
server {{ hostname }} {{ ip }}:{{ target_port }} |