aboutsummaryrefslogtreecommitdiffstats
path: root/terminaldweller.com/haproxy
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-09-08 17:43:16 +0000
committerterminaldweller <thabogre@gmail.com>2021-09-08 17:43:16 +0000
commitd8df67fba0f188039b4cc273788d73b1df7aae59 (patch)
treed3d3fc0bdfc65930fba4678262910316a182be29 /terminaldweller.com/haproxy
parentremoved path from tmux, added short path to shell prompt. removed exa, using ... (diff)
downloadscripts-d8df67fba0f188039b4cc273788d73b1df7aae59.tar.gz
scripts-d8df67fba0f188039b4cc273788d73b1df7aae59.zip
update
Diffstat (limited to 'terminaldweller.com/haproxy')
-rw-r--r--terminaldweller.com/haproxy/docker-compose.yaml5
-rw-r--r--terminaldweller.com/haproxy/haproxy.cfg32
2 files changed, 33 insertions, 4 deletions
diff --git a/terminaldweller.com/haproxy/docker-compose.yaml b/terminaldweller.com/haproxy/docker-compose.yaml
index fe861d0..95752c8 100644
--- a/terminaldweller.com/haproxy/docker-compose.yaml
+++ b/terminaldweller.com/haproxy/docker-compose.yaml
@@ -6,4 +6,7 @@ services:
- "80:80"
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
-
+ networks:
+ - haproxynet
+networks:
+ - haproxynet
diff --git a/terminaldweller.com/haproxy/haproxy.cfg b/terminaldweller.com/haproxy/haproxy.cfg
index 39a42d2..19e7bac 100644
--- a/terminaldweller.com/haproxy/haproxy.cfg
+++ b/terminaldweller.com/haproxy/haproxy.cfg
@@ -1,23 +1,36 @@
global
log 127.0.0.1 local0
-
+
defaults
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
-mode http
+mode tcp
+option tcplog
+option dontlognull
-frontend http
+#Frontends
+frontend front
bind *:80
+bind: *.443
+mode tcp
+timeout client 60s
+
+#ACLs
acl blog-host hdr_sub(host) -i blog.terminaldweller.com
acl mail-host hdr_sub(host) -i mail.terminaldweller.com
acl api-host hdr_sub(host) -i api.terminaldweller.com
+acl chat-host hdr_sub(host) -i chat.terminaldweller.com
+acl chat-host-s req.ssl_sni -i chat.terminaldweller.com
+#Consitions
use_backend blog-backend if blog-host
use_backend mail-backend if mail-host
use_backend api-backend if api-host
+use_backend chat-backend-s if chat-host-s
default_backend blog-backend
+#Backends
backend blog-backend
mode http
option forwardfor
@@ -32,3 +45,16 @@ backend api-backend
mode http
option forwardfor
server api-host 192.99.102.52:8008 check
+
+backend chat-backend
+mode http
+option forwardfor
+server chat-host 87.236.209.206:5280 check
+
+backend chat-backend-s
+timeout server 60s
+timeout client 60s
+mode tcp
+option forwardfor
+option ssl-hello-chk
+server chat-host 87.236.209.206:5281 check