Hi, I’m kind of new with haproxy so apologies first.
We use version 1.8.8 as reverse proxy. Everything works fine with one small exception.
When a user writes the URL adding the HTTPS protocol (i.e https://myurl.com) we expect the result to be https://www.myurl.com and load our page, but this is not the case, ending up with an error timeout.
I add a bit of our config hoping that you can give me a guide.
Thanks in advance.
Blockquote
Default Front-End
frontend reverseproxy
# Listening Ports
bind *:80
bind *:443 ssl crt /etc/haproxy/ssl/external-crt.pem crt /etc/haproxy/ssl/internal-crt.pem
acl is-blocked-ip src -f /etc/haproxy/blocklisted.ips
http-request deny if is-blocked-ip
# Auto-redirect HTTP requests to HTTPS
reqadd X-Forwarded-Proto:\ https if { ssl_fc }
redirect scheme https code 301 if !{ ssl_fc }
option forwardfor
# *******************************
# * ACCESS CONTROL LISTS (ACLs) *
# *******************************
# Main Website
acl host_www.myweburl.com req.hdr(Host) www.myweburl.com req.hdr(Host) myweburl.com
use_backend our-website-prd if host_www.myweburl.com
# Website (Prod)
backend our-website-prd
option forwardfor
option http-server-close
compression algo gzip
compression type text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+r$
option httpchk HEAD /ping HTTP/1.1\r\nHost:prd.website.int
server vsp-wfep-01 xxx.xxx.xxx.xxx:80 check