Traduction française réalisée à l'aide d'un outil automatique. La version anglaise suit ci-dessous.
Bonjour à tous,
Si vous êtes connecté au Wi-Fi de MoodleBox, vous pouvez saisir n'importe quelle adresse dans la barre d'adresse de votre navigateur… mais elle doit se terminer par « home ». Oui, même http://home/ suffit ! Nous vous expliquerons pourquoi plus loin.
Vous serez toujours automatiquement redirigé vers moodlebox.home car Moodle est installé ainsi et l'adresse http://moodlebox.home/ est enregistrée dans le fichier config.php de Moodle. Par conséquent, pour modifier l'URL de Moodle, ce n'est pas le nom d'hôte qui est modifié, mais bien le fichier config.php. Supposons que je remplace l'URL enregistrée dans ce fichier par http://moodlebox.home/. Ensuite, je dois utiliser l'outil d'administration de Moodle, http://lernbox.home/admin/tool/replace/, pour remplacer l'ancienne URL http://moodlebox.home/ par la nouvelle URL http://lernbox.home/ dans toute la base de données. Attention : en cas de problème, Moodle sera inutilisable.
Daniel souhaite savoir ce qui se passe s'il saisit un nom différent de moodlebox dans le champ « Nom d'hôte » lors de la copie. J'ai saisi lernbox. Lorsque je souhaite me connecter à MoodleBox via SSH, je peux saisir n'importe quelle adresse se terminant par home :
ssh moodlebox@moodlebox.home
ssh moodlebox@lernbox.home
ssh moodlebox@home
En effet, seul le nom home est résolu dans le fichier /etc/NetworkManager/dnsmasq-shared.d/00-dhcp.conf, comme pour l'URL http://home/ dans le navigateur. Une fois connecté, je constate un changement. Le terminal affiche :
This is MoodleBox version 4.12.0, 2026-10-04.
MoodleBox is made by Nicolas Martignoni, https://github.com/martignoni/.
Please read the documentation at https://moodlebox.net/.
Last login: Sun Oct 11 09:54:07 2026 from 10.0.0.72
[11:05] moodlebox@lernbox:~ $
Cette entrée a modifié les fichiers /etc/hosts et /etc/hostname. Par conséquent, mon instance MoodleBox écoute désormais en interne sous le nom lernbox, et la commande ping lernbox fonctionne. Mon routeur a également enregistré cette nouvelle instance MoodleBox sous le nom lernbox.
Rien d'autre ne semble se produire.
English version
Hello everyone,
If you are connected to the MoodleBox Wi-Fi, you can enter anything you want in your browser's address bar... but it must end with "home". Yes, even http://home/ is sufficient! The reason for this will be explained later.
You will always be automatically redirected to moodlebox.home because Moodle is installed that way and the address http://moodlebox.home/ is entered in Moodle's config.php file. Therefore, to change the Moodle URL, it's not the hostname that's responsible for copying, but rather the config.php file. Let's say I change the URL entered there to http://lernbox.home/. Then, I need to use Moodle's own administration tool, http://lernbox.home/admin/tool/replace/, to replace the previous URL http://moodlebox.home/ with the new URL http://lernbox.home/ throughout the entire database. But be careful... if this goes wrong, Moodle will be broken.
Daniel wants to know what happens if he enters a different name than moodlebox in the hostname field when copying. I entered lernbox. When I want to connect to the MoodleBox via SSH, I can enter anything here as long as it ends with home:
ssh moodlebox@moodlebox.home
ssh moodlebox@lernbox.home
ssh moodlebox@home
This is because only the name home is resolved in the file /etc/NetworkManager/dnsmasq-shared.d/00-dhcp.conf... it's the same reason as for the URL http://home/ in the browser. Once I'm connected, I see that something has changed. The terminal shows:
This is MoodleBox version 4.12.0, 2026-10-04.
MoodleBox is made by Nicolas Martignoni, https://github.com/martignoni/.
Please read the documentation at https://moodlebox.net/.
Last login: Sun Oct 11 09:54:07 2026 from 10.0.0.72
[11:05] moodlebox@lernbox:~ $
This entry has modified the /etc/hosts and /etc/hostname files. This means that my MoodleBox now listens internally on the name lernbox, and that, for example, ping lernbox works. My router has also registered the new MoodleBox with the name lernbox.
Nothing more seems to happen.