Posts made by Howard Miller

Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Bitnami falls into that realm of "mysterious black box" and I just can't recommend it. If you run into problems, do you know how Bitnami set up Moodle? You don't. Nor do we.

I'm not sure I agree about having a fully containerised version of Moodle. Maybe for "testing" but probably not for production use. It's not very hard to build a set of containers to run Moodle - database, PHP, cache and so on. They all exist and you almost certainly want to tweak them to suit whatever your needs are.

"They have probably found some scenarios where this was a problem"

I don't buy it - sorry. The rest of us (not Bitnami) have been struggling on for years without these sort of mods. 

So you see where this is going - don't use Bitnami. 
Average of ratings: Useful (1)
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Firstly, I know nothing whatever about Bitnami. I've set up Moodle in Docker a lot and I've set it up behind reverse proxies and had no huge problems. I used haproxy, rather than Apache but it should work either way. I've not used any special configuration in Moodle - you do have to make sure that the $CFG->wwwroot setting is correct (it has the "external" URL).  Note that I have never had to enable $CFG->reverseproxy.  That is only there to allow you to port forward (and that's all). For example port 443 in front of the proxy and port 80 behind. 

Without reading your post in detail (TL;DR sorry), this jumped out at me...

if (empty($_SERVER['HTTP_HOST'])) {
$_SERVER['HTTP_HOST'] = '127.0.0.1:8080';
}

There should not be any trickery like this in your config.php file.

Does the Docker Moodle work without the reverse proxy before we go any further?

I should probably add that I loath reverse proxies and always seek any other solution first. I tend to regard it as a miracle if they work. Please don't think I'm being glib and saying "this should be easy"