From 797db6aa7e87984f064084e9c0b1cd7066f90f11 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 28 Dec 2009 16:30:01 -0500 Subject: Adding optios for forwardfor and httpclose. --- config/haproxy/haproxy_frontends_edit.php | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'config/haproxy') diff --git a/config/haproxy/haproxy_frontends_edit.php b/config/haproxy/haproxy_frontends_edit.php index 13ee0745..4b23fb37 100755 --- a/config/haproxy/haproxy_frontends_edit.php +++ b/config/haproxy/haproxy_frontends_edit.php @@ -55,6 +55,9 @@ if (isset($id) && $a_backend[$id]) { $pconfig['balance'] = $a_backend[$id]['balance']; $pconfig['monitor_uri'] = $a_backend[$id]['monitor_uri']; + $pconfig['forwardfor'] = $a_backend[$id]['forwardfor']; + $pconfig['httpclose'] = $a_backend[$id]['httpclose']; + $pconfig['stats_enabled'] = $a_backend[$id]['stats_enabled']; $pconfig['stats_username'] = $a_backend[$id]['stats_username']; $pconfig['stats_password'] = $a_backend[$id]['stats_password']; @@ -65,11 +68,6 @@ if (isset($id) && $a_backend[$id]) { $pconfig['extaddr'] = $a_backend[$id]['extaddr']; $pconfig['max_connections'] = $a_backend[$id]['max_connections']; $pconfig['client_timeout'] = $a_backend[$id]['client_timeout']; - $pconfig['stats_enabled'] = $a_backend[$id]['stats_enabled']; - $pconfig['stats_realm'] = $a_backend[$id]['stats_realm']; - $pconfig['stats_uri'] = $a_backend[$id]['stats_uri']; - $pconfig['stats_username'] = $a_backend[$id]['stats_username']; - $pconfig['stats_password'] = $a_backend[$id]['stats_password']; $pconfig['port'] = $a_backend[$id]['port']; $pconfig['a_acl']=&$a_backend[$id]['ha_acls']['item']; $pconfig['advanced'] = $a_backend[$id]['advanced']; @@ -222,6 +220,8 @@ if ($_POST) { update_if_changed("balance", $backend['balance'], $_POST['balance']); update_if_changed("cookie_name", $backend['cookie_name'], $_POST['cookie_name']); update_if_changed("monitor_uri", $backend['monitor_uri'], $_POST['monitor_uri']); + update_if_changed("forwardfor", $backend['forwardfor'], $_POST['forwardfor']); + update_if_changed("httpclose", $backend['httpclose'], $_POST['httpclose']); update_if_changed("stats_enabled", $backend['stats_enabled'], $_POST['stats_enabled']); update_if_changed("stats_username", $backend['stats_username'], $_POST['stats_username']); update_if_changed("stats_password", $backend['stats_password'], $_POST['stats_password']); @@ -598,6 +598,26 @@ set by the 'retries' parameter (2). */ ?> + + Use 'forwardfor' option + + > +
+ The 'forwardfor' option creates an HTTP 'X-Forwarded-For' header which + contains the client's IP address. This is useful to let the final web server + know what the client address was (eg for statistics on domains) + + + + Use 'httpclose' option + + > +
+ The 'httpclose' option removes any 'Connection' header both ways, and + adds a 'Connection: close' header in each direction. This makes it easier to + disable HTTP keep-alive than the previous 4-rules block. + + Advanced pass thru -- cgit v1.2.3