Hi I have recently hosted moodle on was. now I can access moodle with PUBLICIP/moodle. Now I want to access moodle only with public IP. Can anyone help me with this ?
Hi
No idea, what 'was' means. The usual method is to set the directory the web server searches for files when no path is given to the main directory of Moodle code, i.e. where the config.php file resides. In Apache it is the https://httpd.apache.org/docs/2.4/mod/core.html#documentroot.
You must also change the $CFG->wwwroot in config.php to match and run the https://docs.moodle.org/en/Search_and_replace_tool to get rid of the old URL in the database.
No idea, what 'was' means. The usual method is to set the directory the web server searches for files when no path is given to the main directory of Moodle code, i.e. where the config.php file resides. In Apache it is the https://httpd.apache.org/docs/2.4/mod/core.html#documentroot.
You must also change the $CFG->wwwroot in config.php to match and run the https://docs.moodle.org/en/Search_and_replace_tool to get rid of the old URL in the database.
Hi It was hosted in AWS. I have tried changing the CFG- wwwoot - 'http://PUBLIC IP/moodle’ to 'http://PUBLIC IP/
Detected incorrect $CFG->wwwroot in config.php, it must not contain trailing slash.
Please notify server administrator.
I need to Access Moodle only with Public Ip - http://MY DOMAIN/
Detected incorrect $CFG->wwwroot in config.php, it must not contain trailing slash.
Please notify server administrator.
I need to Access Moodle only with Public Ip - http://MY DOMAIN/
What I wrote earlier is for any plain Unix/Linux server. I don't know AWS. Hope somebody else will come to help.
The error message you posted suggests the answer to your problem - edit config.php and remove the trailing (final) slash in $CFG->wwwroot;
You should consider using a domain name instead of an IP address. It is not only user friendly, but it permits you to install a SSL certificate and use HTTPS, which is a must have these days.
You should consider using a domain name instead of an IP address. It is not only user friendly, but it permits you to install a SSL certificate and use HTTPS, which is a must have these days.