aboutsummaryrefslogtreecommitdiffstats
path: root/terminaldweller.com/haproxy
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--terminaldweller.com/haproxy/haproxy.cfg49
1 files changed, 36 insertions, 13 deletions
diff --git a/terminaldweller.com/haproxy/haproxy.cfg b/terminaldweller.com/haproxy/haproxy.cfg
index 9930fe6..dcc7714 100644
--- a/terminaldweller.com/haproxy/haproxy.cfg
+++ b/terminaldweller.com/haproxy/haproxy.cfg
@@ -26,7 +26,7 @@ resolvers docker_resolver
resolve_retries 3
timeout retry 1000ms
timeout resolve 1000ms
-
+
#Frontends
frontend http
bind *:80
@@ -41,12 +41,22 @@ frontend http
acl editor-host hdr_sub(host) -i editor.terminaldweller.com
acl editorsave-host hdr_sub(host) -i editorsave.terminaldweller.com
acl devourer-host hdr_sub(host) -i mila.terminaldweller.com
+ acl discord-host hdr_sub(host) -i discord.terminaldweller.com
acl mila-api-acl url_beg /mila
acl crypto-api-acl url_beg /crypto
acl http ssl_fc,not
- #Conditions
+
+ #Redirects
#this will prevent any letsencrypt cert challenges from working
- http-request redirect scheme https if http
+ #http-request redirect scheme https if http
+ http-request redirect scheme https code 301 if http blog-host !letsencrypt-acl
+ http-request redirect scheme https code 301 if http editor-host
+ http-request redirect scheme https code 301 if http editorsave-host
+ http-request redirect scheme https code 301 if http api-host
+ http-request redirect scheme https code 301 if http devourer-host
+ #http-request redirect scheme https code 301 if http searx-host !letsencrypt-acl
+
+ #Conditions
#use_backend chat-cert-backend if letsencrypt-acl chat-host
use_backend blog-backend-cert if letsencrypt-acl blog-host
use_backend blog-backend-cert if letsencrypt-acl editor-host
@@ -82,6 +92,7 @@ frontend https
acl cargo-host-s req.ssl_sni -i cargo.terminaldweller.com
acl editor-host-s req.ssl_sni -i editor.terminaldweller.com
acl editorsave-host-s req.ssl_sni -i editorsave.terminaldweller.com
+ acl discord-host-s req.ssl_sni -i discord.terminaldweller.com
#Conditions
use_backend mail-backend-s if mail-host-s
#use_backend chat-backend-s if chat-host-s
@@ -89,20 +100,29 @@ frontend https
#use_backend api-crypto-backend-s if api-host-s crypto-api-acl
use_backend api-crypto-backend-s if api-host-s
use_backend api-mila-backend-s if mila-api-host-s
- #use_backend searx-backend-s if searx-host-s
+ use_backend searx-backend-s if searx-host-s
use_backend cargo-backend-s if cargo-host-s
use_backend editor-backend-s if editor-host-s
use_backend editorsave-backend-s if editorsave-host-s
frontend jabber5222
bind *:5222
- timeout client 60s
mode tcp
- tcp-request inspect-delay 5s
- tcp-request content accept if { req.ssl_hello_type 1 }
- tcp-request content reject
- acl chat-host-s req.ssl_sni -i chat.terminaldweller.com
- use_backend chat-backend-c2s if chat-host-s
+ use_backend chat-backend-c2s
+#frontend jabber5222
+# bind *:5222
+# timeout client 60s
+# mode tcp
+# tcp-request inspect-delay 5s
+# tcp-request content accept if { req.ssl_hello_type 1 }
+# tcp-request content reject
+# acl chat-host-s req.ssl_sni -i chat.terminaldweller.com
+# use_backend chat-backend-c2s if chat-host-s
+#frontend jabbber5222
+# bind *:5280
+# mode http
+# acl chat-host hdr_sub(host) -i chat.terminaldweller.com
+# use_backend chat-backend if chat-host
frontend jabber5280
bind *:5280
mode http
@@ -259,13 +279,16 @@ backend api-mila-backend-cert
backend chat-backend-admin
mode http
server chat-host 130.185.121.80:5280
+backend chat-backend
+ mode http
+ server chat-host 130.185.121.80:5222
backend chat-backend-s
mode tcp
option ssl-hello-chk
server chat-host 130.185.121.80:5443
backend chat-backend-c2s
mode tcp
- option ssl-hello-chk
+ #option ssl-hello-chk
server chat-host 130.185.121.80:5222
backend chat-cert-backend
mode http
@@ -276,11 +299,11 @@ backend searx-backend-cert
server searx-host-cert 130.185.121.80:80
backend searx-backend
mode http
- server searx-host 130.185.121.80:4040
+ server searx-host 130.185.121.80:8080
backend searx-backend-s
mode tcp
option ssl-hello-chk
- server searx-host-s 130.185.121.80:4040
+ server searx-host-s 130.185.121.80:8081 maxconn 10
backend cargo-backend-s
mode tcp