HAProxy - shared posts or multiple posts on a single IP

Hello community, can you help me, I am new to Proxy I am trying to make my publications use the same Public IP, my configuration is the following:

frontend SharedFrontend-merged
bind 0.0.0.0:443 name 0.0.0.0:443 ssl crt-list /var/etc/haproxy/SharedFrontend.crt_list
mode tcp
log global
timeout client 30000
acl ACL_GESTIONA src reportsense.marcobre.com
tcp-request content accept if ACL_GESTIONA
use_backend BACKENDPLATAFMA_ipvANY if ACL_GESTIONA

backend BACKENDPLATAFMA_ipvANY
mode tcp
id 108
log global
timeout connect 600000
timeout server 600000
retries 10
option httpchk OPTIONS /
server PLATAFORMA-MA 172.23.130.88:9190 id 103 check inter 1000

however I am not successful, the errors shown are:

No se puede acceder a este sitio

gestiona.marcobre.com tardó demasiado en responder.

Intenta:

  • Comprobar la conexión.
  • Comprobar el proxy y el firewall.
  • [Ejecución del Diagnóstico de red de Windows](javascript:diagnoseErrors())

ERR_CONNECTION_TIMED_OUT

P.S:
I use pfsense on FreeBSD which is running HAProxy.

Please your support because the company is beginning to doubt the potential of HAProxy and even more of Pfsense and my service

Something like this could work:

frontend SharedFrontend-merged
bind 0.0.0.0:443 name 0.0.0.0:443 ssl crt-list /var/etc/haproxy/SharedFrontend.crt_list
mode http
log global
timeout client 30000
use_backend BACKENDPLATAFMA_ipvANY if { hdr_dom(host) reportsense.marcobre.com }

and swich on backend mode tcp to http.

Dear very grateful for the prompt response, at the HAproxy level it generates the following error, I have the indicated configuration but I can not even solve the redirect problem.

Error:
Errors found while starting haproxy
[ALERT] 273/144146 (81577) : http frontend ‘SharedFrontend-merged’ (/var/etc/haproxy_test/haproxy.cfg:147) tries to use incompatible tcp backend ‘BACKENDPLATAFMA_ipvANY’ (/var/etc/haproxy_test/haproxy.cfg:203) in a ‘use_backend’ rule (see ‘mode’).
[ALERT] 273/144146 (81577) : Fatal errors found in configuration.


Config:

frontend SharedFrontend-merged
bind 0.0.0.0:443 name 0.0.0.0:443 ssl crt-list /var/etc/haproxy_test/SharedFrontend.crt_list
mode http
log global
option http-keep-alive
timeout client 30000
acl aclcrt_SharedFrontend var(txn.txnhost) -m reg -i ^([^.]*).marcobre.com(:([0-9]){1,5})?$
acl aclcrt_SharedFrontend var(txn.txnhost) -m reg -i ^marcobre.com(:([0-9]){1,5})?$
acl ACL_GESTIONA var(txn.txnhost) -m str -i gestiona.marcobre.com
http-request set-var(txn.txnhost) hdr(host)
http-request allow
use_backend BACKENDPLATAFMA_ipvANY if ACL_GESTIONA


Backend:

mode			tcp
id			108
log			global
timeout connect		600000
timeout server		600000
retries			10
server			PLATAFORMA-MA 172.23.130.88:9190 id 103  

Please your support for a prompt solution, they already doubt the HAProxy service due to the inefficiency when doing the redirect.

Can you leave me a contact number or email so I can contact you?

The error message is clear, replace on backend “mode tcp” to “mode http” at it should work.