127.0.0.1 and localhost

Re: 127.0.0.1 and localhost

by Gavin McCullagh -
Number of replies: 0
Hi,

So, what's presumably happening is that both the internal and external users are connecting via the real-world IP Address. 

Your image problem sounds like wwwroot variable is not set right.  You may need to change the wwwroot config variable to the real world root of your site in config.php, eg:

$CFG->wwwroot = 'http://mydomain.no-ip.org/moodle';

You might consider running a small in-house DNS server.  What you would be looking for is a caching DNS server (eg dnsmasq).  First you point it at your real world DNS server and then you can add and override addresses for local access.  So if your site on mydomain.no-ip.org can have a local ip addresses (eg 192.168.1.2) from the inside, but still have the real-world address for outside users.

Gavin