Commit ecabe3fd authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Julien Muchembled

s.r.apache-zope-backend: Add support for multiple listening IPs.

Minimal change, just made to listen identically on IPv4 and IPv6 addresses.
Settings are identical across all IPs.
parent 8071c237
...@@ -57,7 +57,9 @@ class Recipe(GenericBaseRecipe): ...@@ -57,7 +57,9 @@ class Recipe(GenericBaseRecipe):
else: else:
raise ValueError('Unsupported scheme %s' % scheme) raise ValueError('Unsupported scheme %s' % scheme)
ip = self.options['ip'] ip_list = self.options['ip']
if isinstance(ip_list, basestring):
ip_list = [ip_list]
backend_path = self.options.get('backend-path', '/') backend_path = self.options.get('backend-path', '/')
vhost_template_name = self.getTemplateFilename('vhost.in') vhost_template_name = self.getTemplateFilename('vhost.in')
apache_config_file = self.createFile( apache_config_file = self.createFile(
...@@ -78,7 +80,7 @@ class Recipe(GenericBaseRecipe): ...@@ -78,7 +80,7 @@ class Recipe(GenericBaseRecipe):
'port': port, 'port': port,
'backend': ('%s/%s' % (backend.rstrip('/'), backend_path.strip('/'))).rstrip('/'), 'backend': ('%s/%s' % (backend.rstrip('/'), backend_path.strip('/'))).rstrip('/'),
'ssl_enable': ssl_enable, 'ssl_enable': ssl_enable,
}) for (port, backend) in backend_list), }) for (port, backend) in backend_list for ip in ip_list),
}, },
) )
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment