HAProxy 统计页面不工作

HAProxy 统计页面不工作
global
    log 127.0.0.1 local0 notice
    maxconn 2048
    tune.ssl.default-dh-param 2048
    stats socket /run/haproxy/admin.sock mode 660 level admin
    stats timeout 30s
    user haproxy
    group haproxy

defaults
    log     global
    mode    http
    option  httplog
    option  dontlognull
    retries 3
    timeout connect 5000
    timeout client  10000
    timeout server  10000

listen stats
    bind *:1988 ssl crt /srv/mypem.pem
    stats enable
    stats hide-version
    stats realm Haproxy\ Statistics
    stats uri /haproxy
    stats auth user:password

frontend http-in
    bind *:80
    redirect scheme https code 301 if !{ ssl_fc } # redirect all traffic to https

frontend https-in
    bind *:443 ssl crt /srv/mypem.pem
    acl host_mydomain_com       hdr_beg(host) -i mydomain.com
    use_backend mydomain_cluster        if host_mydomain_com

backend mydomain_cluster
    balance leastconn
    option forwardfor
    server s1 x.x.x.x:8080

我似乎无法在 HAProxy 中显示统计信息页面。以上是我的配置。

答案1

哎呀。配置没问题。我忘了打开 1988 端口!问题已解决。

相关内容