The operations described on this page may render your MoodleBox unusable, requiring the complete wiping of the SD card and the loss of all data (course contents, installed plug-ins, custom configurations, etc.). Do this only if you know exactly what you are doing. In any case, no support is provided on this subject.
We accept no responsibility for any direct or indirect damage caused by the use of the MoodleBox, in particular following a change of domain name.
How to proceed
The example below shows how to change the domain name of a MoodleBox, which will allow a local device to reach it with a new URL. The example shows how to give the MoodleBox the domain name
This operation has no influence on access to the MoodleBox from an Ethernet network or from the Internet: the MoodleBox will remain accessible only from the Wi-Fi network it provides, from the devices that have connected to it.
Step 1: Change the host name (hostname)
In the last line of the
/etc/hosts file, replace
/etc/hostname file, replace
mybox (this modification is not necessary, but highly recommended).
Step 2: Adapt the configuration of the nginx web server
Change the file
moodlebox with the full domain name (FQDN)
mybox.me in the
Step 3: Adapt the DHCP server configuration
Change the file
mybox.me in the two lines that start with
Step 4: Adapt the Moodle configuration (Moodle URL)
In the file
/var/www/moodle/config.php, on the line beginning with
$CFG->wwwroot, replace the URL
http://mybox.me. Do not add a slash at the end of the URL.
Step 5: Restart the MoodleBox
In order to apply these changes, restart your MoodleBox.
Step 6: Replace Moodle URLs
Access your MoodleBox through your browser using the new address
http://mybox.me/ and use the URL replacement tool at
http://mybox.me/admin/tool/replace/index.php to replace URLs in the Moodle database.