Attempting to setup LDAPS crashes nextcloud

Nextcloud version (16.05):
Operating system and version (eg, Ubuntu 16.04.6 LTS):

The issue you are facing: When attempting to setup ldaps through the gui I can type ldaps:// in front of my server and tab off the line ok but as soon as I put in 636 for the port number the while things hangs. It says saving and the spinner just spins and never stops. If I reload the page I get “Internal Server Error The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.”

I am able to use nextcloud fine without ldaps. Im not sure what logs to check if I attempt this. I did follow the steps in this link Activate LDAP over SSL