mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 15:22:38 -04:00
Associate vhost with name after selection
This commit is contained in:
parent
65f4332798
commit
2953d3b2ee
1 changed files with 3 additions and 2 deletions
|
|
@ -267,12 +267,11 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||
"in the Apache config", target_name)
|
||||
raise errors.PluginError("No vhost selected")
|
||||
|
||||
if not vhost.ssl:
|
||||
elif not vhost.ssl:
|
||||
addrs = self._get_proposed_addrs(vhost, "443")
|
||||
# TODO: Conflicts is too conservative
|
||||
if not any(vhost.enabled and vhost.conflicts(addrs) for vhost in self.vhosts):
|
||||
vhost = self.make_vhost_ssl(vhost)
|
||||
self.assoc[target_name] = vhost
|
||||
else:
|
||||
logger.error(
|
||||
"The selected vhost would conflict with other HTTPS "
|
||||
|
|
@ -280,6 +279,8 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||
"vhost or add ServerNames to your configuration.")
|
||||
raise errors.PluginError(
|
||||
"VirtualHost not able to be selected.")
|
||||
|
||||
self.assoc[target_name] = vhost
|
||||
return vhost
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue