Hello,
I am pretty new to HaProxy & still get stuck on proper cfg files. I wish I had a good place to configure a demo site. I feel like I would be better if I just experimented more. I am trying to do an entire domain redirect like https://AOL.com would get redirected to https://TimeWarner.com
I am trying to determine if I am able to add a domain url redirect to a listen section of a configuration. My listen section looks like this:
Listen classic.mysite
bind 192.168.1.10:80
redirect scheme https is !{ ssl_fc}
bind 192.168.1.10:443 ssl crt /etc/haproxy/combined.pem
mode http
option tcplog
http-request set-header X-Forwarded-For %[src]
balance source
option httpchk HEAD /farm-stage.aspx HTTP/1.1\r\nHost:\ classic.mysite.com
http-check expect status 200
http-check disable on 404
maxconn 10000
server prodweb1 192.168.1.20:79 maxconn 5000 check fail 5
server prodweb2 192.168.1.30:79 maxconn 5000 check fail 5
server prodweb3 192.168.1.40:79 maxconn 5000 check fail 5
server prodweb4 192.168.1.50:79 maxconn 5000 check fail 5
server Server-SiteDown 192.168.1.60:80 backup maxconn 5000
Am I able to add a redirect or ACL into my listen location? What would it look like? If not then what is the proper way to do this? I found that adding an ACL will work well. But I would need to have a backend config to point to? that means that my config would need over-hauled & I am still not sure it would work.
I appreciate your knowledge & patience.
Thank you in advance!
Will