Switch MoodleBox to HTTPS

The procedure below can be used to configure the MoodleBox to provide secure connections via HTTPS. Once this is done, it will no longer be possible to connect via HTTP.

  1. Access MoodleBox command line interface (via SSH).
  2. Edit file /var/www/moodle/config.php, e.g. typing command nano /var/www/moodle/config.php. Change line beginning with $CFG->wwwroot, replacing http:// by https:// in address http://moodlebox.home, then save.
  3. Edit file /etc/nginx/sites-available/default, e.g. typing command sudo nano /etc/nginx/sites-available/default. According to the instructions in this file, uncomment relevant lines, then save.
  4. Reboot.
  5. Test by loading URL https://moodlebox.home in your favorite browser.

Note

Once the configuration is completed, devices connecting via HTTPS will see a warning window indicating that the MoodleBox certificate is not valid. To remove this warning, each device must install the MoodleBox root certificate.

For more information on this topic, see Installing the root certificate on client devices below.

Installing the root certificate on client devices

To connect to the MoodleBox via HTTPS without displaying a warning window, it is necessary to install the MoodleBox root certificate (or CA certificate). This certificate, issued by the MoodleBox project as a certification authority, allows the browser to ensure that the certificate on the MoodleBox website is valid.

The installation of the CA certificate depends on the browser and operating system.