1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

XSendfile Acceleration for Moodle/NGINX

This commit is contained in:
root 2021-07-05 17:15:12 +00:00
parent b5844e17b8
commit 134997676e
3 changed files with 34 additions and 16 deletions

View file

@ -1,12 +1,16 @@
# 2021-07-02: Let's monitor & learn from these 2 pages year-by-year:
# 2021-07-02: Let's monitor & learn from these 3 pages year-by-year:
# https://docs.moodle.org/311/en/Nginx
# https://github.com/moodlebox/moodlebox/blob/master/roles/moodleinstall/tasks/coreinstall.yml
# https://github.com/moodlebox/moodlebox/blob/master/roles/webserver/templates/etc/nginx/sites-available/default.j2
# Odd that MoodleBox.net is using only the 2nd half of https://docs.moodle.org/311/en/Nginx#XSendfile_aka_X-Accel-Redirect ?
#location ~ ^/moodle/dataroot/ {
# internal;
# alias {{ moodle_data }};
#}
# This passes 404 pages to Moodle so they can be themed
#error_page 404 /error/index.php; error_page 403 =404 /error/index.php;
# https://docs.moodle.org/311/en/Nginx#XSendfile_aka_X-Accel-Redirect
location ~ ^/moodle/dataroot/ {
internal;
alias {{ moodle_data }}/;
}
location ~ ^/moodle(.*)\.php(.*)$ {
alias {{ moodle_base }}$1.php$2;