Installing Let's Encrypt with Moodle

letsEncryptLet's Encrypt allows you to secure traffic to your website.  This article describes how to encrypt a Moodle website.


Create an SSL Certificate

You'll need to create an SSL Certificate for this domain.  Here's how to use Let's Encrypt with Siteground hosting.

 

Configure Moodle

  1. Navigate to the config.php file in the File manager.
  2. Look for the line 17 (on default config files) that shows:
$CFG->wwwroot = 'http://secure.yourdomain.com';

Change the http:// to https:// like the following:

$CFG->wwwroot = 'https://secure.yourdomain.com';

Next, Set up a redirect in your .htaccess file, by placing the following code to force the https:// redirect.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://secure.yourdomain.com/$1 [R,L]

 

Thanks for visiting.