Мой haproxy.cfg выглядит следующим образом:
global
log 127.0.0.1 local0
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
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
# CloudForms Management UI URL
listen apache
bind 10.94.104.23:80
mode http
balance source
server tower1 xx.xx.xx.231:80 check inter 1s
server tower2 xx.xx.xx.232:80 check inter 1s
server tower3 xx.xx.xx.233:80 check inter 1s
listen apache
bind xx.xx.xx.23:443 ssl crt /etc/ssl/certs/ndc3pclnclm01.inroot.in.pem
mode http
balance source
server tower1 xx.xx.xx.231:443 check inter 1s
server tower2 xx.xx.xx.232:443 check inter 1s
server tower3 xx.xx.xx.233:443 check inter 1s
Когда мы переходим на страницу https сайта, мы получаем 400, т.е. неверный запрос. Однако, когда я удаляю ssl crt /etc/ssl/certs/ndc3pclnclm01.inroot.in.pem
, он работает как положено.
Кроме того, я вижу ниже сообщения в / var / log / messages:
Jan 6 11:18:01 ndc3pclnclm01 haproxy-systemd-wrapper: haproxy-systemd-wrapper: exit, haproxy RC=0
Jan 6 11:18:01 ndc3pclnclm01 systemd: Stopped HAProxy Load Balancer.
Jan 6 11:18:01 ndc3pclnclm01 systemd: Started HAProxy Load Balancer.
Jan 6 11:18:01 ndc3pclnclm01 haproxy-systemd-wrapper: [WARNING] 005/111801 (115162) : Parsing [/etc/haproxy/haproxy.cfg:35]: proxy 'apache' has same name as another proxy (declared at /etc/haproxy/haproxy.cfg:28).
Jan 6 11:18:01 ndc3pclnclm01 haproxy-systemd-wrapper: [WARNING] 005/111801 (115162) : parsing [/etc/haproxy/haproxy.cfg:13] : 'option httplog' not usable with proxy 'apache' (needs 'mode http'). Falling back to 'option tcplog'.
Jan 6 11:18:01 ndc3pclnclm01 haproxy-systemd-wrapper: [WARNING] 005/111801 (115162) : config : 'option forwardfor' ignored for proxy 'apache' as it requires HTTP mode.
Jan 6 11:18:01 ndc3pclnclm01 haproxy-systemd-wrapper: [WARNING] 005/111801 (115162) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
Jan 6 11:19:37 ndc3pclnclm01 systemd: Stopping HAProxy Load Balancer...
Jan 6 11:19:37 ndc3pclnclm01 haproxy-systemd-wrapper: haproxy-systemd-wrapper: exit, haproxy RC=0
Jan 6 11:19:37 ndc3pclnclm01 systemd: Stopped HAProxy Load Balancer.
Jan 6 11:19:37 ndc3pclnclm01 systemd: Started HAProxy Load Balancer.
Jan 6 11:19:37 ndc3pclnclm01 haproxy-systemd-wrapper: [WARNING] 005/111937 (115326) : Parsing [/etc/haproxy/haproxy.cfg:35]: proxy 'apache' has same name as another proxy (declared at /etc/haproxy/haproxy.cfg:28).
Любая помощь приветствуется. спасибо заранее.