1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/moodle/templates/moodle-nginx.conf.j2

32 lines
1.2 KiB
Django/Jinja

# 2021-07-02: Let's monitor & learn from these 2 pages year-by-year:
# https://docs.moodle.org/311/en/Nginx
# 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 }};
#}
location ~ ^/moodle(.*)\.php(.*)$ {
alias {{ moodle_base }}$1.php$2;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass php;
fastcgi_read_timeout 300; # Default is 60s
include fastcgi_params; # fastcgi.conf also works
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
# Uncomment to override /etc/php/<VERSION>/fpm/php.ini -- FYI Stage 4's
# roles/www_options/tasks/main.yml FORCES these same settings and more
# (equivalent to 'nginx_high_php_limits: True') when 'moodle_install: True'
#fastcgi_param PHP_VALUE "max_execution_time=300\n upload_max_filesize=500M\n post_max_size=500M\n max_input_vars=5000";
}
location ~ ^/moodle {
root {{ iiab_base }};
}