Unable to renew expired certificate

Hi my certificates have expired and when i try and renew them is giving me the below error. Upon checking the conf file i have nothing written on Line 24.

Any help would be greatly appreciated.

My domain is:
portal.stcatherines.eu

I ran this command:
certbot renew --dry-run

It produced this output:


Processing /etc/letsencrypt/renewal/portal.stcatherines.eu.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/portal.stcatherines.eu-le-ssl.conf on line 24: Syntax error’,)
Attempting to renew cert (portal.stcatherines.eu) from /etc/letsencrypt/renewal/portal.stcatherines.eu.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/portal.stcatherines.eu-le-ssl.conf on line 24: Syntax error’,). Skipping.

My web server is (include version):
Apache version 2.4.25

The operating system my web server runs on is (include version):
Debian Linux 9

My hosting provider, if applicable, is:

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):
Webmin 1.930

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

version 0.28.0

1 Like

Hi @mcassar

there is your answer: What's there? Fix it.

1 Like

I know…but i have nothing on line 24

here’s a look at the conf file.

           <IfModule mod_ssl.c>
>             <VirtualHost *:443>
>             DocumentRoot "/var/www/html/schs/docroot"
>             ServerName portal.stcatherines.eu
>             <Directory "/var/www/html/schs/docroot">
>             #allow from all
>             #Options None
>             #Require all granted
>             Options Indexes FollowSymLinks
>             AllowOverride All
>             Require all granted
>             </Directory>
>             RewriteEngine on
>             # Some rewrite rules in this file were disabled on your HTTPS site,
>             # because they have the potential to create redirection loops.
>             # RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
>             Include /etc/letsencrypt/options-ssl-apache.conf
>             SSLCertificateFile /etc/letsencrypt/live/portal.stcatherines.eu/fullchain.pem
>             SSLCertificateKeyFile /etc/letsencrypt/live/portal.stcatherines.eu/privkey.pem
>             </VirtualHost>

Then it's a missing end element or a typo (a wrong single char).

PS: Use three ``` then a return to format the output. Then - new line, again three + return.

I rearrange with what i have quoted…i noticed i didn’t have the <IfModule mod_ssl.c> when i quoted the conf file.

I am still getting the same errors.

Now you see your problem.

what is it? I need to close the IfModule? I tried that already.

An open element must be closed. May be possible an empty element isn’t allowed. Then deactivate the whole file.

Hi I dont see any syntax error in the conf file. Could it be any other issue?

If any one could help me renew my certificates with a detailed instructions on how to do it I would greatly appreciate.

Thanks

Issue is resolved. Thanks for your help!

1 Like

You may wish to remove the leading ‘>’ characters in the config file. Apache does not really like them.

1 Like

A post was split to a new topic: Tlsv1 alert internal error - no SSL connection possible

What I use to renew all certs is this command

certbot certonly --standalone -n -d www.website.net

It doesn’t rely on the often bugged Apache plugin, you will probably have to down the https server with

systemctl stop httpd.service

1 Like

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