mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
commit
f018895d72
1 changed files with 4 additions and 2 deletions
|
|
@ -895,9 +895,10 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||
for addr in vhost.addrs:
|
||||
# In Apache 2.2, when a NameVirtualHost directive is not
|
||||
# set, "*" and "_default_" will conflict when sharing a port
|
||||
addrs = set((addr,))
|
||||
if addr.get_addr() in ("*", "_default_"):
|
||||
addrs = [obj.Addr((a, addr.get_port(),))
|
||||
for a in ("*", "_default_")]
|
||||
addrs.update(obj.Addr((a, addr.get_port(),))
|
||||
for a in ("*", "_default_"))
|
||||
|
||||
for test_vh in self.vhosts:
|
||||
if (vhost.filep != test_vh.filep and
|
||||
|
|
@ -907,6 +908,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||
self.add_name_vhost(addr)
|
||||
logger.info("Enabling NameVirtualHosts on %s", addr)
|
||||
need_to_save = True
|
||||
break
|
||||
|
||||
if need_to_save:
|
||||
self.save()
|
||||
|
|
|
|||
Loading…
Reference in a new issue