aboutsummaryrefslogtreecommitdiffstats
path: root/terminaldweller.com/haproxy/haproxy.cfg
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/haproxy.cfg
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/haproxy.cfg')
-rw-r--r--terminaldweller.com/haproxy/haproxy.cfg32
1 files changed, 29 insertions, 3 deletions
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