Moodle and Nat

Moodle and Nat

by Mike Kanfer -
Number of replies: 3
We have installed Moodle on a WIN2k3 machine for testing purposes. The machine has been Nat'ed out. It works fine within the school however from outside of school, when we attempt to access Moodle using the external IP in the browser, it attempts to load the page using the private IP address. (This shows at the bottom of IE in the status bar.) We don't have a DNS records yet for the machine. Anyone have suggestions for this problem? Thanks.

Mike
Average of ratings: -
In reply to Mike Kanfer

Re: Moodle and Nat

by Martín Langhoff -
Add a bit of code in config.php to set $CFG->wwwroot depending on $_SERVER[HTTP_HOST]. wink
In reply to Martín Langhoff

Re: Moodle and Nat

by Mike Kanfer -
Thanks for the response. In the config.php file the $CFG->wwwroot is set to the private address of the server. I am not sure what you mean by the $_SERVER[HTTP_HOST] variable.

Thanks.
In reply to Mike Kanfer

Re: Moodle and Nat

by Ian Scott -

Go to config.php and set to the correct URL (don't use direct addressing) that waty it will work internally and externally

ie line to change $CFG->wwwroot   = 'http://mitie.edu.au';