diff options
Diffstat (limited to 'config/varnish64/varnish.inc')
-rw-r--r-- | config/varnish64/varnish.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc index d21245d8..026f602c 100644 --- a/config/varnish64/varnish.inc +++ b/config/varnish64/varnish.inc @@ -197,8 +197,13 @@ EOFA; foreach($config['installedpackages']['varnishlbdirectors']['config'] as $backend) { $director = ""; if($backend['row']) - foreach($backend['row'] as $be) - $director .= "\t{\n\t\t.backend = {$be['backendname']};\n\t}"; + foreach($backend['row'] as $be) { + if($be['weight']) + $weight = "\n\t\t\t.weight = {$be['weight']};\n" + else + $weight = ""; + $director .= "\t{\n\t\t.backend = {$be['backendname']};\n{$weight}\t}"; + } $backends .= <<<EOFA director {$backend['directorname']} {$backend['directortype']} { {$director} |