LDAP wrong configuration and now Nextcloud not logging in

Okay, I found the solution in our case, which was to renew the TLS certificates at /etc/univention/ssl (which are the certificates used for LDAP.)
(Resource: Renewing the SSL certificates ).

Not sure if that would help with your issue.