aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/haproxy-dev/haproxy.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc
index 12920103..4207a3ca 100644
--- a/config/haproxy-dev/haproxy.inc
+++ b/config/haproxy-dev/haproxy.inc
@@ -374,6 +374,7 @@ function haproxy_configure() {
fwrite ($fd, "\tdefault_backend\t\t" . $bind['defaultpool'] . "\n");
// Combine the rest of the listener configs
+ $i = 0;
foreach ($bind['config'] as $bconfig) {
$a_acl=&$bconfig['ha_acls']['item'];
if(!is_array($a_acl))
@@ -400,8 +401,10 @@ function haproxy_configure() {
else
$expr = $entry['expression'] . " " . $entry['value'];
- fwrite ($fd, "\tacl\t\t\t".$entry['name']."\t".$expr."\n");
- fwrite ($fd, "\tuse_backend\t\t$poolname if " . $entry['name'] . "\n");
+ $aclname = $i . "_" . $entry['name'];
+ fwrite ($fd, "\tacl\t\t\t" . $aclname . "\t" . $expr . "\n");
+ fwrite ($fd, "\tuse_backend\t\t" . $poolname . " if " . $aclname . "\n");
+ $i++;
}
}