Can not connet from internal computer. Browser shows ERR_CERT_COMMON_NAME_INVALID

Hello,

I’m new here and this is my first post, so hopefully I’m in the correct group.

I’ve installed nextcloud via snap on a local computer which runs ubuntu server 16.04
So my nextcloud version is 12.0.5.3

I’ve used dynamic dns provider (no-ip) to reach the nextcloud installation from outside.

I’ve enabled https and created a let’s encrypt certificate. Everything works fine and I can reach the nextcloud server via Internet.

My problem is, that I can’t access the nextcloud directly from an internal computer, because I receive a security message in all browsers which tells me that it’s not a secure connection. The certificate seems to be invalid.

Can someone put me on the right track to localize this problem, because I wan’t to work with the nextcloud on my local server even when the server is disconnected from the internet.

Thanks

I know this is many months later, but this you solve the issue?
I’m exactly on the same spot.
Tks.

Common Name is the fully qualified domain name of the server as given to letsencrypt to create cert with. Since you’re trying to access the server internally by a different name than what you gave letsencrypt, the cert won’t ever match, and you get this error. This is by design. You can try to workaround this by manually putting an entry in /etc/hosts (linux, unix, OSX), or the Windows equivalent c:\windows\system32\driver\etc\hosts:

#192.168.125.12 nextcloud.example.com
internalip servername

or by otherwise manipulating local DNS (if you run local authoritative DNS servers).
This will override your DNS settings, so won’t work outside your home lan.

There is nothing to fix, as this is how SSL certs are supposed to work. Its HTTP SSL basics.

Yep, I understand the cert was only for the certified site name.
Didn’t want to play with DNS, so I opted to create a self-cert for my intranet. Will have to self renew once per year and hope to remember of this solution.

If you want to play with Let’s Encrypt here are good hints.