SSL certificate not trusted

Hello,

I have been running the Nextcloud VM for a few months now as a test. Everything was working fine including the SSL certificate. Yesterday I created a new VM from the official image and also ran through the SSL certificate creation again during the setup. The domain name is still the same but now all browsers are telling me that they don’t trust the certificate.

I then ran a check on ssllabs.com. it shows me the error in the screenshot below. What bothers me is that it says “nextcloud” everywhere. Shouldn’t it mention my domain somewhere?

It would be great if someone could point me in the right direction.

https://www.ssllabs.com/ssltest shows this result

Well, that certificate is a self-signed one, which is generally untrusted by every browser on this world by now. Also, the common name should include the complete hostname. This usually points to DNS issue, where the host is unable to determine it’s fqdn from the local network.

Ok, but my question is how this can happen when I did everything through the script which is run during setting up the VM?

Does it mean that the created certificate is simply wrong?

What do you mean by the host can’t determine its fqdn? What could be the reason for that?

As I said before it was working before for the old VM I was running. Yesterday I ran the SSL cert creation a few times cause I was trying a few things setting up new VMs a few times. And now the SSL cert is not working.

So I found the issue. Just want to mention it here in case it helps anymon in the future.

For whatever reason I had an additional enabled configuration in the apache2 folder. There was my “mydomain.com.conf” and there was a “nextcloud_ssl_domain_self_signed.conf”. As soon as I had removed that config from the enabled folder with the “a2dissite nextcloud_ssl_domain_self_signed.conf” everythign was working fine.