Hi all. My question is, if instead of the current config with two backends, if I can use 1 backend and on the frontend or something use the “use-server” to make the config with only 1 backend?
global
log /dev/log local0
log /dev/log local1 notice
user haproxy
group haproxy
daemon
defaults
log global
option httplog # Use HTTP log format
option dontlognull # Don't log null connections
timeout connect 5s # Default connection timeout
timeout client 30s # Default client timeout
timeout server 30s # Default server timeout
### Sendmail Configuration
mailers smtp_domain
mailer smtp1 mailproxy.domain.com:25
mailer smtp2 mailproxy.domain.com:25
#############################
### HTTP
#############################
frontend http_frontend
bind *:80
mode tcp
redirect scheme https code 301 if !{ ssl_fc }
#############################
### HTTPS
#############################
frontend https_frontend
bind *:443
mode tcp
option tcplog
## Only PRIMARY
acl proxyonly_sni req.ssl_sni -i gitlab.domain.com registry.domain.com
use_backend https_Primary if proxyonly_sni
## CLOUD - PRIMARY
default_backend https
### Backend for Cloud
backend https
email-alert mailers smtp_domain
email-alert level debug
email-alert from alarm@domain.com
email-alert to alarm@domain.com
mode tcp
option ssl-hello-chk
server Cloud cloud.domain.com:443 check fall 5
server Primary primary.domain.com:443 check backup
### Backend for Primary
backend https_Primary
email-alert mailers smtp_domain
email-alert level debug
email-alert from alarm@domain.com
email-alert to alarm@domain.com
mode tcp
option ssl-hello-chk
server Primary primary.domain.com:443 check