How to configure haproxy for https dashboard
I tried to use haproxy for the dashboard high availability and encryption. I can visit my dashboard through https://my_ip/dashboard . But when I tried to login, it will redirect the page to http, which is not encrypted.
here's my haproxy configuration:
frontend horizon-https-vip
bind x.x.x.x:443 ssl crt /root/server.pem ca-file /root/server.crt
reqadd X-Forwarded-Proto:\ https
default_backend horizon-https-api
backend horizon-https-api
redirect scheme https code 301 if !{ ssl_fc }
balance source
cookie SERVERID insert indirect nocache
mode http
option forwardfor
option httpchk
option httpclose
rspidel ^Set-cookie:\ IP=
server controller01 10.0.0.1:80 cookie controller01 check inter 2000 rise 2 fall 5
server controller02 10.0.0.2:80 cookie controller02 check inter 2000 rise 2 fall 5
Did you change something on Horizons configs? Ususally, when choosing either http or https, your connection stays that way. Are your LB to force sessions to be https?