The guide is 5.6 X-Sendfile
We have done:
1) Install apache x-modfile using "apt install libapache2-mod-xsendfile"
2) Enable module and check if enabled
a2enmod xsendfile
apachectl -M | grep xsendfile
xsendfile_module (shared)
3) Added to Moodle config.phpAlso we have tried remove all the folders except /dataroot/
NOTE: $CFG->dataroot is $CFG->dataroot = '/var/www/moodledata';
3) Added to apache site config
Moodle is in site.notworking.com/moodle, there is a redirection on site.notworking.com/index.html -> /moodle
4) Clear Moodle cache and restart apache
The result is server can't find files and images and scripts are not working.
Apache error shows lines like
[Sat Nov 07 22:19:17.415787 2020] [:error] [pid 3308:tid 140610607892224] (20023)The given path was above the root path: [client xxxx:57163] xsendfile: unable to find file: /dataroot/localcache/theme/1604782453/adaptable/pix/core/i/navigationitem.svg, referer: https://site.notworking.com/moodle/my/
/dataroot/localcache/theme/1604782453/adaptable/pix/core/i/navigationitem.svg (replace dataroot by /var/www/moodledata) and file exists and with right permissions.
ls -l /var/www/moodledata/localcache/theme/1604782453/adaptable/pix/core/i/navigationitem.svg
-rw-rw-rw- 1 www-data www-data 396 nov 7 21:54
/var/www/moodledata/localcache/theme/1604782453/adaptable/pix/core/i/navigationitem.svg
What can we do?
we have tried paths involved ended with /, not ended, ...