-
Bug
-
Resolution: Not a bug
-
Minor
-
None
-
3.9.2
-
None
-
MOODLE_39_STABLE
In the file: /lib/setuplib.php, there is a deliberate blocking of using multiple accessible addresses for the same moodle instance, like the comment says these lines block such configuration but only if there's 'reverseproxy' configuration enabled.
What is the purpose of this block, why couldn't an admin allow access from different addresses?
// hopefully this will stop all those "clever" admins trying to set up moodle
// with two different addresses in intranet and Internet
if (!empty($CFG->reverseproxy) && $rurl['host'] === $wwwroot['host'])Unknown macro: { print_error('reverseproxyabused', 'error'); }
I have managed to allow intranet access through one url, and internet access through another, by not even setting 'reverseproxy' and using nginx as internet revproxy to always replace the moodle local address to the internet exposed address by including the local network port as well as usual provided hostname.. (nginx set-header Host hostname:port)
The reason for this is due to my ISP, which for some reason blocks 'loopback' access,
So if I try to access my external internet IPv4, from within the local network, I get no response,
but from an external internet network (like mobile 4G LTE, or other ISP), it works just fine,
leaving me with the only option to expose moodle both locally (direct) and externally (nginx)
or also modify hosts file on every computer
- has a non-specific relationship to
-
MDL-63770 Moodle doesn't work when external port number doesn't equal internal
-
- Closed
-