zulhfreelancer
9/12/2017 - 7:50 AM

HAProxy - redirect http to https

HAProxy - redirect http to https

Normal Port: Redirect to HTTPS (80 to 443)

frontend 80
redirect scheme https code 301 if !{ ssl_fc }

Custom Port: Redirect to HTTPS (2052 to 2053)

frontend 2052
http-request replace-value Host (.*):2052 \1:2053
redirect scheme https code 301 if !{ ssl_fc }