In https port redirect http to https

my goal is
when client connect https port but use http protocol
haproxy redirect to https protocol
it’s possible ?

current client will get

curl: (52) Empty reply from server

and haproxy server log

https/v4: SSL handshake failure

my haproxy version: 2.7.11 ( Kubernetes Ingress 1.10.11)

Hi @owan!
Yes, it is possible.
In your http frontend configuration, you simply add a rule like this:
http-request redirect scheme https if ACLXXX
where ACLXXX represents the acl rule that identifies your server.
And then, obviously, you have to configure the https frontend and backend.

Notice however that I’m using haproxy v2.9.d6 (development version) so something may be different.