1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00
This commit is contained in:
George Hunt 2019-10-15 18:42:04 +01:00 committed by Jerry Vonau
parent a2c79f9a31
commit 4778ad5e3c
25 changed files with 206 additions and 38 deletions

View file

@ -81,6 +81,15 @@
mode: 0644
when: moodle_enabled | bool
- name: Install nginx's config file from template, if moodle_enabled
template:
src: moodle-nginx.conf.j2
dest: "/etc/nginx/conf.d/moodle-nginx.conf"
owner: root
group: root
mode: 0644
when: moodle_enabled | bool
- name: Create symlink 022-moodle.conf from sites-enabled to sites-available, if moodle_enabled (debuntu)
file:
src: /etc/apache2/sites-available/022-moodle.conf

View file

@ -0,0 +1,13 @@
location /moodle {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:{{ apache_port }};
}
location ~ ^/moodle.*\.php$ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:{{ apache_port }};
}

View file

@ -0,0 +1,16 @@
location ^/moodle {
alias /opt/iiab/moodle;
try_files $uri $uri/ index.php =404;
}
location ~ /moodle/(.*)\.php {
root /opt/iiab/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}