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.
- Access MoodleBox command line interface (via SSH).
- Edit file
/var/www/moodle/config.php
, e.g. typing commandnano /var/www/moodle/config.php
. Change line beginning with$CFG->wwwroot
, replacinghttp://
byhttps://
in addresshttp://moodlebox.home
, then save. - Edit file
/etc/nginx/sites-available/default
, e.g. typing commandsudo nano /etc/nginx/sites-available/default
. According to the instructions in this file, uncomment relevant lines, then save. - Reboot.
- 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.