I just installed and configure Moodle 4 on Ubuntu 20.04 with Apache. However, after shutting down and restarting the server, it doesn't work. When I browse to <ip adress>/moodle, it waits a minute or two then redirects to a different IP address. Chrome developer tools shows that the new address is in fact requested, but I don't recognize the new address. I am using mysql. Moodle was installed from the git repository
what address is in you config.php file?
in your config.php file update the server ip addr - $CFG->wwwroot = 'http://your-server-address';
Thn test
In reply to Anna Naden
Re: moodle times out and redirects to another IP address
by Visvanath Ratnaweera -
I guess, you are new to Moodle. This thing is anchored in Moodle architecture: If you want Moodle to have the URL http://example.com, that exactly should be in $CFG->wwwroot in the config.php. If you want http://moodle.example.com, that'll be in $CFG->wwwroot. If you want http://example.com/moodle that is what in $CFG->wwwroot. If you want http://an.ip.address that that should be in $CFG->wwwroot. And so on. The same with https.