Private NextCloud server giving an Invalid Certificate error

Hello friends.

I’m currently running NextCloud 9.x version on an Ubuntu 16.04 server. I run it with SSL enabled with PHP 7. Recently I’ve been getting errors while connecting with a client/mobile client. I get Invalid Certificate errors. This is what I found in apache2 error.log file:

[ssl:warn] [pid 1198] AH01909: nc.bayton.org:443:0 server certificate does NOT include an ID which matches the server name
[mpm_prefork:notice] [pid 1198] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured – resuming normal operations

If it helps, I’ve also noticed this error when I do an ‘apt update’:

W: http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/Release.gpg: Signature by key DDA2C105C4B73A6649AD2BBD47AE7F72479BC94B uses weak digest algorithm (SHA1)

Maybe this has something to do with it?

Anyways any help and suggestions with this would be much appreciated. Thanks you.

Both errors are not related.

Your certificate is not for the domain nc.bayton.org. Is this your domain? The server name must match the certificate name (I think it was in the common name where you have to set it).

Thanks for your reply. So how do I remove the certificate that is in error. This is a private server that is not served with a DNS. How do I register a SSL certificate using my local server name? Thanks in advance again. Funny thing is when I first set this up, it worked just fine for about a couple of weeks.