There seems to be two ways to configuring SSL for Moodle s/w. One is where SSL termination happens at a Proxy (like Nginx). Another is where termination is done at Moodle itself. Both the configs are outlined on
Transitioning to HTTPS - MoodleDocs
You may want to add a redirection so that users who have the current http:// address to your site will be redirected…
Our setup above is basically the Nginx approach outlined in above link. As mentioned there we tried configuring the sslproxy and wwwroot settings in Moodle’s config.php. But that does not seem to be enough. The login page shows up correctly, but the site takes long time to respond after that. Some additional work is probably needed on the Moodle side. We did try converting all the resources for SSL, as outlined on the above link, but that also did not help. Our conclusion was more detailed investigation is needed on the Moodle side.