From 9e57bb0ac2fe675ec501bf26b411f637c590366e Mon Sep 17 00:00:00 2001 From: sullrich Date: Tue, 15 Dec 2009 19:50:38 -0500 Subject: Use ssl-hello-chk instead of httpchk when using https --- config/haproxy/haproxy.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc index 65d09521..6e8c4261 100644 --- a/config/haproxy/haproxy.inc +++ b/config/haproxy/haproxy.inc @@ -149,19 +149,19 @@ function haproxy_configure() { fwrite ($fd, "{$listenip}"); // https is an alias for tcp for clarity purpouses - if(strtolower($backend['type']) == "https") + if(strtolower($backend['type']) == "https") { $backend_type = "tcp"; - else + $httpchk = "ssl-hello-chk"; + } else { $backend_type = $backend['type']; + $httpchk = "httpchk"; + } fwrite ($fd, "\tmode\t\t\t" . $backend_type . "\n"); fwrite ($fd, "\tlog\t\t\tglobal\n"); fwrite ($fd, "\toption\t\t\tdontlognull\n"); fwrite ($fd, "\toption\t\t\thttpclose\n"); fwrite ($fd, "\toption\t\t\tforwardfor\n"); - - if($backend['type'] == "https") - fwrite ($fd, "\toption\t\t\tssl-hello-chk\n"); if($backend['max_connections']) fwrite ($fd, "\tmaxconn\t\t\t" . $backend['max_connections'] . "\n"); @@ -184,7 +184,7 @@ function haproxy_configure() { if($backend['cookie_name']) fwrite ($fd, "\tcookie\t\t\t" . $backend['cookie_name'] . " insert indirect\n"); - fwrite ($fd, "\toption\t\t\thttpchk HEAD " . $backend['monitor_uri'] . " HTTP/1.0\n"); + fwrite ($fd, "\toption\t\t\t{$httpchk} HEAD " . $backend['monitor_uri'] . " HTTP/1.0\n"); if($backend['stats_enabled']=='yes') { fwrite ($fd, "\tstats\t\t\tenable\n"); -- cgit v1.2.3