mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Merge branch 'http01-nginx' of github.com:certbot/certbot into test-http01-nginx2
This commit is contained in:
commit
cfe5854aa3
1 changed files with 2 additions and 11 deletions
|
|
@ -392,17 +392,8 @@ class NginxConfigurator(common.Installer):
|
|||
"""
|
||||
matches = self._get_redirect_ranked_matches(target_name, port)
|
||||
vhost = self._select_best_name_match(matches)
|
||||
if not vhost:
|
||||
if create_if_no_match:
|
||||
vhost = self._vhost_from_duplicated_default(target_name)
|
||||
else:
|
||||
# No matches. Raise a misconfiguration error.
|
||||
raise errors.MisconfigurationError(
|
||||
("Cannot find a VirtualHost matching domain %s. "
|
||||
"In order for Certbot to correctly perform the challenge "
|
||||
"please add a corresponding server_name directive to your "
|
||||
"nginx configuration: "
|
||||
"https://nginx.org/en/docs/http/server_names.html") % (target_name))
|
||||
if not vhost and create_if_no_match:
|
||||
vhost = self._vhost_from_duplicated_default(target_name)
|
||||
return vhost
|
||||
|
||||
def _get_redirect_ranked_matches(self, target_name, port):
|
||||
|
|
|
|||
Loading…
Reference in a new issue