@Kevin ... thanks for correcting guess it shows I need glasses! :\
but back to your problem.
Bitnami ... yes, I noticed that Amazon has quite of few of those with apps pre-installed ... kinda.
Amazon also offers a regular Ubuntu without Bitnami ... but no Moodle - nor apache, nor php, nor MySQL. The regular Ubuntu actually built by Canonical for Amazons virtuals.
Me thinks that Bitnami offerings are for folks that were looking for an easy button ... they will find, however, Bitnami images not the way to go. Correct me if I am wrong, but if PHP, MySQL or Apache needs an update for security reasons, one cannot use apt-get or whatever Ubutnu normally uses for package mangement, to acquire just the piece that needs updating. With Bitnami don't you have to go after the bitnami package that contains the update? Wow! That adds a level of complexity and puts your server 1 step removed from the true source Canonical.
So what one reads in Moodle.org docs may not apply to bitnami installs. OR if it appears to might not be correct for Bitnami installs.
See ... I think on the typical Ubuntu install apache user/group is www-data:www-data and NOT bitnami:bitnami .... and daemon ... have no idea! Just know that's not typical on Ubuntu, CentOS, RHEL, nor SuSIE Sled. Not saying change it ... see next line ...
So since you've got Bitnami what do Bitnami forums/folks say about this? They provided the package to Amazon!!!!
BTW, those curl commands just acquire some addtional information about the server ... like:
Server: Apache
X-Powered-By: PHP/5.6.25
Think I'd manually remove *contents* of moodledata/cache/ and moodledata/localcache/ and moodledata/sessions/
Remove cookies and caches from all browsers used.
Just did a look see at a 3.1.x functioning site using clean theme
Check this out:
[root@sos moodle31data]# find ./localcache -name \*.css
./localcache/theme/1473652118/clean/css/all.css
./localcache/theme/1473652118/clean/css/all.2.css
./localcache/theme/1473652118/clean/css/all.0.css
./localcache/theme/1473652118/clean/css/all.1.css
That 1473652118 is an epoch time stamp
So in your site ... use the same command and we can see what theme you are using.
On the functioning site used for finding ... is a CentOS box:
/var/www/moodle31data/localcache/theme/1473652118
drwxrwsrwx 4 apache apache 4096 Sep 11 22:50 clean
So be liberal with permissions ... if your data diretory is already protected and apache user is the only user that can access and interact, suggest
chmod ugo+rwx moodledata -R
'spirit of sharing', Ken