mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
This is reportedly the correct magic
This commit is contained in:
@@ -341,7 +341,7 @@ class NginxConfigurator(common.Plugin):
|
||||
options_subblock = self.parser.loc["ssl_options"]
|
||||
# the options file doesn't have a newline at the beginning, but there
|
||||
# needs to be one when it's dropped into the file
|
||||
if "\n" not in options_subblock[0]:
|
||||
if options_subblock and "\n" not in options_subblock[0]:
|
||||
options_subblock[0].insert(0, "\n")
|
||||
ssl_block = (
|
||||
[['\n ', 'listen', ' ', '{0} ssl'.format(self.config.tls_sni_01_port)],
|
||||
|
||||
@@ -179,7 +179,7 @@ class NginxParser(object):
|
||||
with open(ssl_options) as _file:
|
||||
return nginxparser.load(_file).spaced
|
||||
except IOError:
|
||||
logger.debug("Could not open file: %s", ssl_options)
|
||||
logger.warn("Missing NGINX TLS options file: %s", ssl_options)
|
||||
except pyparsing.ParseException:
|
||||
logger.debug("Could not parse file: %s", ssl_options)
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user