Skip to content

Commit

Permalink
Add haproxy configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
AEtherC0r3 committed Aug 30, 2016
1 parent 23147f0 commit dd72fea
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions haproxy.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
resolvers docker_dns
nameserver dnsmasq 127.0.0.1:53

frontend ft_http
bind *:80
bind :::80
mode http
default_backend bk_http

frontend ft_https
bind *:443
bind :::443
mode tcp
default_backend bk_https

backend bk_http
mode http

acl website hdr(host) -i techministry.rocks
acl website hdr(host) -i www.techministry.rocks
acl discourse hdr(host) -i discourse.techministry.rocks

use-server website_server if website
use-server discourse_server if discourse

server website_server website:80 resolvers docker_dns
server discourse_server discourse:80 resolvers docker_dns

backend bk_https
mode tcp

acl website req_ssl_sni -i techministry.rocks
acl website req_ssl_sni -i www.techministry.rocks
acl discourse req_ssl_sni -i discourse.techministry.rocks

use-server website_server if website
use-server discourse_server if discourse

server website_server website:443 resolvers docker_dns
server discourse_server discourse:443 resolvers docker_dns

0 comments on commit dd72fea

Please sign in to comment.