HAProxy community

Redirect scheme on SSL Handshake Error


I have the following configuration:

listen kibana_external
bind ssl crt /etc/haproxy/haproxy.pem
http-request set-header X-Forwarded-Proto https if { ssl_fc }
server foo check inter 2000 rise 2 fall 5
server foo2 check inter 2000 rise 2 fall 5

This works great when a user goes to

When users go to, they get an empty reply and HAProxy logs an SSL Handshake Error. I would like for HAProxy to send a Redirect Scheme. Can this be done?


Maybe I asked this wrong. I think this should be easy.
I want to listen on port 5601.
If an HTTP request comes in, redirect scheme to HTTPS, keeping the same port 5601.
When an HTTPS request comes in, map to a server.