Was heißt für dich "realer Server"?
[2.4.5-RELEASE][admin@pfsense.domain.lan]/: cat /var/etc/haproxy/haproxy.cfg # Automaticaly generated, dont edit manually.# Generated on: 2020-06-19 04:14global maxconn 1000 log /var/run/log local0 info stats socket /tmp/haproxy.socket level admin expose-fd listeners uid 80 gid 80 nbproc 1 nbthread 1 hard-stop-after 15m chroot /tmp/haproxy_chroot daemon tune.ssl.default-dh-param 2048 log-send-hostname pfsense.domain.lan server-state-file /tmp/haproxy_server_state lua-load /var/etc/haproxy/luascript_acme-http01-webroot.lualisten HAProxyLocalStats bind 127.0.0.1:2200 name localstats mode http stats enable stats refresh 10 stats admin if TRUE stats show-legends stats uri /haproxy/haproxy_stats.php?haproxystats=1 timeout client 5000 timeout connect 5000 timeout server 5000# Frontend mit default backend und SNIfrontend sec-server bind WAN-IP(changing every day):443 name WAN-IP(changing every day):443 mode tcp log global timeout client 30000 tcp-request inspect-delay 5s acl nextc-sni req.ssl_sni -i <nextcloud1-url> acl is_sni_nextl req.ssl_sni -i <nextcloud1-url> acl sni_code req.ssl_sni -i <code-url> tcp-request content accept if { req.ssl_hello_type 1 } use_backend nextcloud-debian_ipvANY if nextc-sni use_backend nextcloud-debian_ipvANY if is_sni_nextl use_backend code-office_ipvANY if sni_code default_backend offload-server_ipvANY# Offloading *Frontend*frontend offload-server bind 127.0.0.1:1443 name 127.0.0.1:1443 ssl crt-list /var/etc/haproxy/offload-server.crt_list bind /tmp/haproxy_chroot/offload-server.socket name unixsocket uid 80 accept-proxy ssl crt-list /var/etc/haproxy/offload-server.crt_list mode http log global option http-keep-alive timeout client 30000 acl is_url_autodiscover var(txn.txnhost) -m beg -i autodiscover acl is_url_autoconfig var(txn.txnhost) -m beg -i autoconfig acl is_path_mail var(txn.txnpath) -m sub -i /mail/ acl is_path_autodiscover var(txn.txnpath) -m sub -i /autodiscover/ acl is_path_mobile var(txn.txnpath) -m sub -i /mobileconfig acl is_url_automaten var(txn.txnhost) -m beg -i sub.homeautomaten.tdl acl aclcrt_offload-server var(txn.txnhost) -m reg -i ^autoconfig\.domain1\.de(:([0-9]){1,5})?$ acl aclcrt_offload-server var(txn.txnhost) -m reg -i ^autoconfig\.domain2\.net(:([0-9]){1,5})?$ acl aclcrt_offload-server var(txn.txnhost) -m reg -i ^autodiscover\.domain1\.de(:([0-9]){1,5})?$ acl aclcrt_offload-server var(txn.txnhost) -m reg -i ^autodiscover\.domain2\.net(:([0-9]){1,5})?$ acl aclcrt_offload-server var(txn.txnhost) -m reg -i ^sub\.homeauto\.de(:([0-9]){1,5})?$ http-request set-var(txn.txnhost) hdr(host) http-request set-var(txn.txnpath) path use_backend automx_ipvANY if is_url_autodiscover is_path_autodiscover aclcrt_offload-server use_backend automx_ipvANY if is_url_autoconfig is_path_mail aclcrt_offload-server use_backend automx_ipvANY if is_url_autodiscover is_path_mobile aclcrt_offload-server use_backend automaten_ipvANY if is_url_automaten aclcrt_offload-server# Port 80 Frontendfrontend http-automx bind WAN-IP(changing every day):80 name WAN-IP(changing every day):80 mode http log global option log-separate-errors option httplog option http-keep-alive timeout client 30000 acl is_mail var(txn.txnpath) -m sub -i /mail/ acl is_hostname var(txn.txnhost) -m beg -i autoconfig acl is_url_acme var(txn.txnpath) -m beg -i /.well-known/acme-challenge/ http-request set-var(txn.txnpath) path http-request set-var(txn.txnhost) hdr(host) http-request use-service lua.acme-http01 if METH_GET is_url_acme use_backend automx_ipvANY if is_hostname is_mail backend nextcloud-debian_ipvANY mode tcp id 103 log global option log-health-checks timeout connect 30000 timeout server 30000 retries 3 acl nextcACL req.ssl_sni -i <nextcloud1-url> acl nextl req.ssl_sni -i <nextcloud2-url> tcp-request content accept if { req.ssl_hello_type 1 } server nextcloud DMZ-IP:443 id 104 check inter 1000 backend code-office_ipvANY mode tcp id 105 log global timeout connect 30000 timeout server 30000 retries 3 acl office-dmzACL req.ssl_sni -m sub -i <code-url> tcp-request content accept if { req.ssl_hello_type 1 } server office DMZ-IP:443 id 106 check inter 1000 # default Backendbackend offload-server_ipvANY mode tcp id 108 log global timeout connect 30000 timeout server 30000 retries 3 server frontend-offload /offload-server.socket send-proxy-v2-ssl-cn id 109 check inter 5000 backend automx_ipvANY mode http id 100 log global option log-health-checks timeout connect 30000 timeout server 30000 retries 3 option httpchk OPTIONS / server automx-back MAIL-IP:80 id 107 check inter 1000 backend automaten_ipvANY mode http id 110 log global option log-health-checks timeout connect 30000 timeout server 30000 retries 3 server automaten-back AUTOMATEN-IP:8123 id 107 check inter 1000
Ich verstehe die Logik nicht ganz, warum du nicht alles schlicht gleich behandelst via SNI?