From 9fafe1620cd4339515aa996aa382f031aded341f Mon Sep 17 00:00:00 2001 From: sullrich Date: Tue, 15 Dec 2009 17:35:29 -0500 Subject: Do not duplicate mode directive and add otiuon ssl-hello-chk for https type --- config/haproxy/haproxy.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config/haproxy') diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc index 59350259..65d09521 100644 --- a/config/haproxy/haproxy.inc +++ b/config/haproxy/haproxy.inc @@ -149,7 +149,7 @@ function haproxy_configure() { fwrite ($fd, "{$listenip}"); // https is an alias for tcp for clarity purpouses - if($backend['type'] == "https") + if(strtolower($backend['type']) == "https") $backend_type = "tcp"; else $backend_type = $backend['type']; @@ -160,15 +160,15 @@ function haproxy_configure() { 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"); if($backend['client_timeout']) fwrite ($fd, "\tclitimeout\t\t" . $backend['client_timeout'] . "\n"); - if($backend['type']) - fwrite ($fd, "\tmode\t\t\t" . $backend['type'] . "\n"); - if($backend['balance']) fwrite ($fd, "\tbalance\t\t\t" . $backend['balance'] . "\n"); -- cgit v1.2.3