Failed to renew certificate

When trying to renew my certificate it says there is an error with my svn.conf file (shown below)...

Alias /svn "/var/www/svn"
<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerAdmin xxxxxxx
                ServerName freeflyer.dynu.net
                ServerAlias www.freeflyer.dynu.net
                DocumentRoot /var/www/svn
<Location /svn>
  DAV svn
  SVNParentPath /media/storage/svn
  SVNListParentPath On
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/subversion/passwd
  Require valid-user
</Location>

My domain is:

I ran this command:
sudo certbot renew

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/freeflyer.dynu.net.conf


Failed to renew certificate freeflyer.dynu.net with 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/svn.conf on line 17: Syntax error')


All renewals failed. The following certificates could not be renewed:
/etc/letsencrypt/live/freeflyer.dynu.net/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

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

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

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):
No

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

Doesn't the <IfModule> need a matching </IfModule>?

3 Likes

Welcome @freeflyer

There is no ending </VirtualHost> statement. Is it missing or you just did not post it?

Also, I don't see any SSL config yet you have it for port 443. Can you explain more how you got this config?

And also the missing line that @danb35 notes

2 Likes

I tried adding </VirtualHost> but still got the same error

Its missing, I added it but still got the same error

I cant remember where I got the config

Normally the --apache option of Certbot will create the VirtualHost for port 443. But, that does not look like Certbot created it. In fact, I'm not sure Certbot supports those extensions in the Apache config.

Although, I see you have been getting Let's Encrypt certs for this domain for a very long time. What has changed since Feb2 when you most recently got a cert?

3 Likes

These are the instructions I followed to install and configure svn...

The thing that changed in February, was that I did a complete fresh install of Ubuntu

These are the instructions I followed for Lets Encypt....

!

This is how I installed SVN server...

I added < /VirtualHost> and < /IfModule> to the svn.conf file as shown below and it has fixed the certificate renewal....

Only problem is that it seems to have broken my svn server.

I can check out and update, but if I try to comitt I get the following error...

vn: E135000: Commit failed (details follow):
svn: E135000: Error normalizing log message to internal format
svn: E135000: Inconsistent line ending style