How To : enable HTTPS in moodle

  SSL Certificate

In admin > admin user > site administration > security > HTTP security > select Use HTTPS for logins

in /public_html/moodle/config.php
change http to https

$CFG->wwwroot = 'http://moodle.domain.my';

in .htaccess

DirectoryIndex index.php
RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}