Skip to content

Instantly share code, notes, and snippets.

@gmolveau
Created October 29, 2018 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmolveau/ea652efc7bc69edc231ffca82745e094 to your computer and use it in GitHub Desktop.
Save gmolveau/ea652efc7bc69edc231ffca82745e094 to your computer and use it in GitHub Desktop.
Moodle HTTPS transition

Setting HTTPS in moodle

  1. Login to moodle, navigate to Site administration > Security > HTTP security > HTTPS conversion tool. and run it.

  2. Then on your server, edit config.php :

nano /var/www/html/moodle/config.php

and change $CFG->wwwroot = 'http://XXXXXX.com'; to $CFG->wwwroot = 'https://XXXXXX.com';

  1. Set up LetsEncrypt with Apache2, activate HTTP-to-HTTPS redirect. (e.g. https://certbot.eff.org/lets-encrypt/ubuntuxenial-apache.html)

Done :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment