Moodle Hosting Issue

Moodle Hosting Issue

by noorul arshad -
Number of replies: 4

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 ?

Average of ratings: -
In reply to noorul arshad

Re: Moodle Hosting Issue

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
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.
In reply to Visvanath Ratnaweera

Re: Moodle Hosting Issue

by noorul arshad -
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/
In reply to noorul arshad

Re: Moodle Hosting Issue

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
What I wrote earlier is for any plain Unix/Linux server. I don't know AWS. Hope somebody else will come to help.
In reply to noorul arshad

Re: Moodle Hosting Issue

by Matt T -
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.
Average of ratings: Useful (1)