@jdaviescoates it was the
HTTP_X_FORWARDED_FORthing, not the apache port ^^
Take a look at: https://moodle.org/mod/forum/discuss.php?d=385061#p1552240
Beside the suggestion/question from Howard, what is setting for:
Site Admin -> Server -> http
Logged IP address source
Default: HTTP_CLIENT_IP, HTTP_X_FORWARDED_FOR, REMOTE_ADDR
If your server is behind a reverse proxy, you can use this setting to specify which HTTP headers can be trusted to >contain the remote IP address. The headers are read in order, using the first one that is available.
'spirit of sharing', Ken
HTTP_X_FORWARDED_FORshould work if the the Docker gateway IP is added as trusted/ignored proxy for Moodle. I only found reverseproxy = true as an configuration option which (AFAIK) does not help. However you should be able to adjust the settings in the UI instead
Go to Site Admin -> Server -> http and do as follow:
Since @girish should already know whats up, maybe he can help to make this change permanent for all instances.
EDIT PS: I DID NOT TEST THIS I'M JUST GUESSING PLEASE CONFIRM WORKING FIRST
EDIT2: Confirmed working
3 February 2021, 12:44 AM Admin User - System System Config log created The user with id '2' changed the config setting 'reverseproxyignore' for component 'core' from '' to '172.18.0.1'. web 176.XX.XXX.XXX (my IP)