Search

LetsEncrypt renew Apache PluginError((‘There has been an error in parsing the file (%s): %s’, u’/etc/apache2/sites-enabled/000-default-le-ssl.conf’, u’Syntax error’),).

LetsEncrypt renew Apache PluginError((‘There has been an error in parsing the file (%s): %s’, u’/etc/apache2/sites-enabled/000-default-le-ssl.conf’, u’Syntax error’),).

Trying to renew a LetsEncrypt SSL certificate in Apache and I got this unhelpful error message:
PluginError((‘There has been an error in parsing the file (%s): %s’, u’/etc/apache2/sites-enabled/000-default-le-ssl.conf’, u’Syntax error’),).

Now I can understand most error messages and figure out the issue but this one had me stumped. There was nowhere near enough information to allow me to determine the nature of the error.

My config file parsed correctly and worked without issue so I knew there was nothing fundamentally wrong with it.

Eventually I pinned it down to one of two problems:
* CaSe NoT MatcHing in <> –
* XML layout incorrect:

<ifModule greg>
	WhiteSpaces must be consistent
This line is incorrect and will break letsencrypt
	This is correct and will parse without issue
	All entries must line up
	<ifModule somethingelse>
		This must be indented correctly too
This line is incorrect and will break letsencrypt
	This line is incorrect and will break letsencrypt
		This is correct and will parse without issue
	</ifModule>
</ifModule>

This version is correct

<ifModule greg>
	WhiteSpaces must be consistent
	This line was incorrect and would have broken letsencrypt
	This is correct and will parse without issue
	All entries must line up
	<ifModule somethingelse>
		This must be indented correctly too
		This line was incorrect and would have broken letsencrypt
		This line was incorrect and would have broken letsencrypt
		This is correct and will parse without issue
	</ifModule>
</ifModule>

If this post helped, please consider clicking one of the ads. It costs you nothing but I get a nominal fee.

Related posts

Leave a Comment