这是我的 haproxy 配置文件的样子。
我的前端和后端服务器正在运行,没有错误。端口 8442 和 443 正在 haproxy 服务器上监听。
我收到错误无法连接到 bserverd1.dev.exa:443;连接被拒绝
如何解决这个难题。
global
log 127.0.0.1 local2 info
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
tune.ssl.default-dh-param 2048
stats socket /var/lib/haproxy/stats
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
listen stats :8181
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
frontend port_8442
bind *:8442 ssl crt-list /etc/haproxy/ssl/list/cert-list.txt
reqadd X-Forwarded-Proto:\ https
acl badmin path_reg -i ^/BAdmin.*$
use_backend BAdmDev if { ssl_fc_sni bdev.dev.exa } badmin
mode http
option tcplog
frontend port_443
bind *:443 ssl crt-list /etc/haproxy/ssl/list/cert-list.txt
redirect scheme https if !{ ssl_fc }
mode http
acl Exten path_reg -i ^/BExten.*$
use_backend BExtenDev if { ssl_fc_sni bdev.dev.exa } Exten
backend BAdmDev
mode http
balance roundrobin
cookie SERVERID insert indirect nocache
server bserverd1 bserverd1.dev.exa:8442 ssl check verify none cookie t1
server bserverd2 bserverd2.dev.exa:8442 ssl check verify none cookie t2
backend BExtenDev
redirect scheme https if !{ ssl_fc }
mode http
balance roundrobin
option httpchk GET /BExtens
cookie SERVERID insert indirect nocache
server bserverd3 bserverd3.dev.exa:8442 ssl check verify none
server bserverd4 bserverd4.dev.exa:8442 ssl check verify none `