From 06ea9faba91fe5684e14bea9f8591f88b4a7339d Mon Sep 17 00:00:00 2001 From: thompsa Date: Mon, 8 Feb 2010 12:23:06 +1300 Subject: Provide default for monitor_uri --- config/haproxy-dev/haproxy.inc | 7 ++++++- config/haproxy-dev/haproxy_pool_edit.php | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'config/haproxy-dev') diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc index 0a8f60fc..e60823b3 100644 --- a/config/haproxy-dev/haproxy.inc +++ b/config/haproxy-dev/haproxy.inc @@ -246,7 +246,12 @@ function haproxy_configure() { if($pool['cookie_name']) fwrite ($fd, "\tcookie\t\t\t" . $pool['cookie_name'] . " insert indirect\n"); - fwrite ($fd, "\toption\t\t\t{$httpchk} HEAD " . $pool['monitor_uri'] . " HTTP/1.0\n"); + $uri = $pool['monitor_uri']; + if ($pool['monitor_uri']) + $uri = $pool['monitor_uri']; + else + $uri = "/"; + fwrite ($fd, "\toption\t\t\t{$httpchk} HEAD " . $uri . " HTTP/1.0\n"); if($pool['cookie']) $cookie = " cookie {$pool['cookie']} "; diff --git a/config/haproxy-dev/haproxy_pool_edit.php b/config/haproxy-dev/haproxy_pool_edit.php index 20104a5c..728c9880 100755 --- a/config/haproxy-dev/haproxy_pool_edit.php +++ b/config/haproxy-dev/haproxy_pool_edit.php @@ -286,7 +286,8 @@ function clearcombo(){ Health check URI - size="64">
+ size="64"> +
Defaults to / if left blank. -- cgit v1.2.3