From 4d72fa42e315614f8a453d51667ca54130ba8de9 Mon Sep 17 00:00:00 2001 From: Noah Swartz Date: Tue, 15 Aug 2017 17:00:03 -0700 Subject: [PATCH] expand nginx no name error --- certbot-nginx/certbot_nginx/configurator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/certbot-nginx/certbot_nginx/configurator.py b/certbot-nginx/certbot_nginx/configurator.py index fbe881bb0..80df1c4f5 100644 --- a/certbot-nginx/certbot_nginx/configurator.py +++ b/certbot-nginx/certbot_nginx/configurator.py @@ -236,7 +236,10 @@ class NginxConfigurator(common.Plugin): if not vhost: # No matches. Raise a misconfiguration error. raise errors.MisconfigurationError( - "Cannot find a VirtualHost matching domain %s." % (target_name)) + """Cannot find a VirtualHost matching domain %s. + In order for Certbot to correctly perform the challenge + please add a server_name directive to your nginx configuration. + This configuration file can likely be found in /etc/nginx""" % (target_name)) else: # Note: if we are enhancing with ocsp, vhost should already be ssl. if not vhost.ssl: