I'm trying to set up an HAProxy that will listen on port 80 and roundrobin redirect location any traffic to two servers along with doing the health check.
The servers have different URL's so afaik I can't use server <name> <ip>:<port> check lines as I want the client's browser to read https:///ssl1.blah.com or https://ssl2.blah.com
Here's my haproxy.cfg:
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 4096
#debug
#quiet
user haproxy
group haproxy
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen webfarm *:80
mode http
stats enable
stats auth admin:apassword
balance roundrobin
option forwardfor
redirect location https://ssl1.blah.com/gohere
redirect location https://ssl2.blah.com/gohere
Any pointers would be greatly appreciated. This is my first adventure with HAProxy or any software NLB.
Thanks