From 31522b22cb5f7ece1fd6abaf7464ea0fedc54ce9 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sat, 4 Jan 2020 05:28:47 -0600 Subject: [PATCH] move dokuwiki shim --- roles/dokuwiki/tasks/enable.yml | 14 ++++++++++++++ roles/dokuwiki/templates/dokuwiki-nginx.conf | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 roles/dokuwiki/templates/dokuwiki-nginx.conf diff --git a/roles/dokuwiki/tasks/enable.yml b/roles/dokuwiki/tasks/enable.yml index 9e035e214..4b54a5cf0 100644 --- a/roles/dokuwiki/tasks/enable.yml +++ b/roles/dokuwiki/tasks/enable.yml @@ -11,11 +11,25 @@ state: absent when: not dokuwiki_enabled and is_debuntu +- name: Install {{ nginx_config_dir }}/dokuwiki-nginx.conf SHIM from template + template: + src: dokuwiki-nginx.conf + dest: "{{ nginx_config_dir }}/dokuwiki-nginx.conf" + when: dokuwiki_enabled and nginx_enabled + - name: Restart Apache ({{ apache_service }}) to enable/disable DokuWiki's http://box/wiki systemd: name: "{{ apache_service }}" daemon_reload: yes state: restarted + when: apache_enabled + +- name: Restart nginx to enable/disable DokuWiki's http://box/wiki + systemd: + name: nginx + daemon_reload: yes + state: restarted + when: nginx_enabled - name: Add 'dokuwiki' variable values to {{ iiab_ini_file }} ini_file: diff --git a/roles/dokuwiki/templates/dokuwiki-nginx.conf b/roles/dokuwiki/templates/dokuwiki-nginx.conf new file mode 100644 index 000000000..9bbfe2cf7 --- /dev/null +++ b/roles/dokuwiki/templates/dokuwiki-nginx.conf @@ -0,0 +1,3 @@ +location {{ dokuwiki_url }} { + proxy_pass http://127.0.0.1:{{ apache_port }}{{ dokuwiki_url }}; +}