Certbot renew fails with "The apache plugin is not working; there may be problems with your existing configuration."

I am unable to renew the certificate. The alleged syntax error is on line 80, but line 80 is EOF.

My domain is: cycletaiwan.com

I ran this command: certbot renew

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log

Processing /etc/letsencrypt/renewal/cycletaiwan.com.conf


Cert is due for renewal, auto-renewing...
Could not choose appropriate plugin: The apache plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('There has been an error in parsing the file /etc/apache2/sites-enabled/cycletaiwan.conf on line 80: Syntax error',)
Attempting to renew cert (cycletaiwan.com) from /etc/letsencrypt/renewal/cycletaiwan.com.conf produced an unexpected error: The apache plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('There has been an error in parsing the file /etc/apache2/sites-enabled/cycletaiwan.conf on line 80: Syntax error',). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/cycletaiwan.com/fullchain.pem (failure)


All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/cycletaiwan.com/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)

My web server is (include version): Apache/2.4.18 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 16.04

My hosting provider, if applicable, is: Digital Ocean

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 0.31.0

2 Likes

If the line is EOF, then there's likely an unclosed tag somewhere in the file.

Posting the entire thing might help, if you can.

2 Likes

trying to edit for better formatting, standby. This is really painful, why can't this forum use simple tags?

1 Like

Thanks!

The bottom of that file does indeed seem chopped off. At the very least, it is missing

</VirtualHost>
</IfModule>

but there might be more stuff missing than that, I can't tell what was truncated.

#justmarkdownthings. You can wrap it in:

```
<virtualhost blah blah>
# etc
```
2 Likes

wow, you saw it while I was trying to fix up the formatting and before I nuked the whole thing.... and you fixed it. Thank you!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.