Nextcloud renew expired certificates


I have own wildcard certificates (* .cer - * .key - * .pfx) supplied by the CA, I have replaced the expired certificates in the file “nextcloud.conf” located in the directory: / etc / apache2 / sites- available /

The modified lines are:
SSLEngine on
SSLCertificateFile /etc/ssl/certs/wildcard.certificate.cer
SSLCertificateKeyFile /etc/ssl/private/wildcard.certificate.key

The certificates are located in the indicated directories.

The apache server does not assume the new certificates,
I can access it and it presents me with the expired certificate as not valid but it lets me work.

Before to install new certificates I can’t access to server with I got this error:
" The connection is Untrusted"

How can I make apache assume the new certificates that I have installed?

Thanks in advance.!!

Restart Apache. It doesn’t automatically pick up changed cert files.

Thanks Lambert,

That I did it, several times. but the problem wasn’t resolved.
I have spent a lot time reading in many foros but I haven’t found anything, so accidentally erase the files into the folder “/etc/apache2/sites-enabled” and nextcloud access sttoped working, I recopied the files again from “etc/apache2/sites-available” to “etc/apache2/sites-enabled” and I restarted the apache service and “eureka” it was working fine with the new certificate.

But the next day the error come back again…(the old certificate came back, I deleted the old certificates from folders “/etc/ssl/certs” and “/etc/ssl/private”, I don’t understand how they can came back.

I don’t understand, I’m going to crazy…

I went back to delete the files the folder “etc/apache2/sites-enabled” and copy the files from “etc/apache2/sites-available” to “etc/apache2/sites-enabled” one more time and it was working fine again.

I need help about this issue,

Why does this happend?
Why does apache change to the old certiifcates.?
How can I resolve this permanently?


Please, can someone give me some light on this topic.?

You’re going to have to look at the file system entries for your certs. Are they symlinks? Is something in your system “correcting” the files during one of the daily maintenance scripts?

Thanks Lambert… I’m still with the issue.
How can I check symlinks and maintenance scripts?


You’re going to have to learn some basic *nix file system information. Then you’ll know how to look at symlinks. That’s the trouble with open source software, part of the cost is having to know how to troubleshoot things at a lower level. $ vs. time.

I, unfortunately, don’t have time to walk anyone through the process at this time. Some of the new user forums specific to your version of *nix will probably have helpful people who have decided to have time to help bring newbies up to speed. But it’s going to take an investment of time on your part.

The people in here are probably more focused on NextCloud knowledge share than basic *nix knowledge share, in general.