mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 18:56:55 +02:00
Merge pull request #2654 from letsencrypt/issue_2320
don't include files that have multiple vhosts
This commit is contained in:
@@ -545,6 +545,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||||||
paths = self.aug.match(
|
paths = self.aug.match(
|
||||||
("/files%s//*[label()=~regexp('%s')]" %
|
("/files%s//*[label()=~regexp('%s')]" %
|
||||||
(vhost_path, parser.case_i("VirtualHost"))))
|
(vhost_path, parser.case_i("VirtualHost"))))
|
||||||
|
paths = [path for path in paths if os.path.basename(path) == "VirtualHost"]
|
||||||
for path in paths:
|
for path in paths:
|
||||||
new_vhost = self._create_vhost(path)
|
new_vhost = self._create_vhost(path)
|
||||||
realpath = os.path.realpath(new_vhost.filep)
|
realpath = os.path.realpath(new_vhost.filep)
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ def _vhost_menu(domain, vhosts):
|
|||||||
code, tag = zope.component.getUtility(interfaces.IDisplay).menu(
|
code, tag = zope.component.getUtility(interfaces.IDisplay).menu(
|
||||||
"We were unable to find a vhost with a ServerName "
|
"We were unable to find a vhost with a ServerName "
|
||||||
"or Address of {0}.{1}Which virtual host would you "
|
"or Address of {0}.{1}Which virtual host would you "
|
||||||
"like to choose?".format(domain, os.linesep),
|
"like to choose?\n(note: conf files with multiple "
|
||||||
|
"vhosts are not yet supported)".format(domain, os.linesep),
|
||||||
choices, help_label="More Info", ok_label="Select")
|
choices, help_label="More Info", ok_label="Select")
|
||||||
except errors.MissingCommandlineFlag as e:
|
except errors.MissingCommandlineFlag as e:
|
||||||
msg = ("Failed to run Apache plugin non-interactively{1}{0}{1}"
|
msg = ("Failed to run Apache plugin non-interactively{1}{0}{1}"
|
||||||
|
|||||||
Reference in New Issue
Block a user