Moodle - change access URL

If you entered localhost or some other access URL for local testing when installing moodle and your actual users will be using another URL to access your moodle site, they will be getting this error (and be redirected to the address you entered):
Incorrect access detected, this server may be accessed only through "http://localhost" address, sorry.
Please notify server administrator.

You can change this URL in config.php which is found in your moodle folder (for example: C:\inetpub\moodle\config.php).
Open it with notepad, find: "$CFG->wwwroot" and modify it to whatever you need, for example:
$CFG->wwwroot = 'http://learning/';
Save the file. Then your users will be able to access your moodle site via http://learning/


No comments:

Post a Comment