2021-07-05 17:15:12 +00:00
|
|
|
# 2021-07-02: Let's monitor & learn from these 3 pages year-by-year:
|
2021-07-02 18:37:00 +00:00
|
|
|
# https://docs.moodle.org/311/en/Nginx
|
2021-07-05 17:15:12 +00:00
|
|
|
# https://github.com/moodlebox/moodlebox/blob/master/roles/moodleinstall/tasks/coreinstall.yml
|
2021-07-02 18:37:00 +00:00
|
|
|
# https://github.com/moodlebox/moodlebox/blob/master/roles/webserver/templates/etc/nginx/sites-available/default.j2
|
|
|
|
|
2021-07-05 17:15:12 +00:00
|
|
|
# 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
|
2021-07-05 20:57:26 +00:00
|
|
|
# https://github.com/moodle/moodle/blob/master/config-dist.php#L274-L287
|
|
|
|
location /dataroot/ {
|
2021-07-05 17:15:12 +00:00
|
|
|
internal;
|
|
|
|
alias {{ moodle_data }}/;
|
|
|
|
}
|
2021-06-28 20:44:39 +00:00
|
|
|
|
2021-07-01 06:19:22 +00:00
|
|
|
location ~ ^/moodle(.*)\.php(.*)$ {
|
|
|
|
alias {{ moodle_base }}$1.php$2;
|
2021-07-02 15:15:56 +00:00
|
|
|
|
2021-06-28 19:09:53 +00:00
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
2021-06-28 20:44:39 +00:00
|
|
|
fastcgi_index index.php;
|
2021-07-02 15:15:56 +00:00
|
|
|
fastcgi_pass php;
|
2021-07-01 06:19:22 +00:00
|
|
|
|
2021-07-02 16:52:51 +00:00
|
|
|
fastcgi_read_timeout 300; # Default is 60s
|
2021-07-02 15:15:56 +00:00
|
|
|
|
2021-07-02 16:52:51 +00:00
|
|
|
include fastcgi_params; # fastcgi.conf also works
|
2021-07-02 15:15:56 +00:00
|
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
|
|
|
|
|
2021-07-02 16:52:51 +00:00
|
|
|
# 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'
|
2022-03-25 00:07:59 +00:00
|
|
|
#fastcgi_param PHP_VALUE "max_execution_time=300\n upload_max_filesize=10000M\n post_max_size=10000M\n max_input_vars=5000";
|
2021-07-02 15:15:56 +00:00
|
|
|
}
|
2021-07-01 06:19:22 +00:00
|
|
|
|
2021-07-02 15:15:56 +00:00
|
|
|
location ~ ^/moodle {
|
2021-07-01 06:19:22 +00:00
|
|
|
root {{ iiab_base }};
|
|
|
|
}
|