mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
checkin
This commit is contained in:
parent
a2c79f9a31
commit
4778ad5e3c
25 changed files with 206 additions and 38 deletions
|
@ -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
|
||||
|
|
13
roles/moodle/templates/moodle-nginx.conf.j2
Normal file
13
roles/moodle/templates/moodle-nginx.conf.j2
Normal 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 }};
|
||||
}
|
||||
|
16
roles/moodle/templates/moodle-nginx.conf.j2.native
Normal file
16
roles/moodle/templates/moodle-nginx.conf.j2.native
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue