mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #2847 from holta/mediawiki-sugarizer-wordpress-no-apache
MediaWiki + Sugarizer + WordPress w/o Apache
This commit is contained in:
commit
aff547df98
15 changed files with 18 additions and 45 deletions
|
@ -93,12 +93,6 @@
|
|||
regexp: '^\$wgServer ='
|
||||
line: '$wgServer = "//" . $_SERVER["HTTP_HOST"];'
|
||||
|
||||
- name: 'Install from template: /etc/{{ apache_conf_dir }}/mediawiki.conf -- for http://box{{ mediawiki_url }}'
|
||||
template:
|
||||
src: mediawiki.conf.j2
|
||||
dest: "/etc/{{ apache_conf_dir }}/mediawiki.conf" # apache2/sites-available
|
||||
when: apache_installed is defined
|
||||
|
||||
|
||||
# RECORD MediaWiki AS INSTALLED
|
||||
|
||||
|
|
|
@ -24,13 +24,8 @@
|
|||
when: mediawiki_installed is undefined
|
||||
|
||||
|
||||
- name: Enable/Disable/Restart Apache if primary
|
||||
include_tasks: apache.yml
|
||||
when: not nginx_enabled
|
||||
|
||||
- name: Enable/Disable/Restart NGINX if primary
|
||||
- name: Enable/Disable/Restart NGINX
|
||||
include_tasks: nginx.yml
|
||||
when: nginx_enabled
|
||||
|
||||
|
||||
- name: Add 'mediawiki' variable values to {{ iiab_ini_file }}
|
||||
|
|
|
@ -20,12 +20,15 @@
|
|||
* jupyterhub
|
||||
* kolibri
|
||||
* lokole
|
||||
* mediawiki
|
||||
* moodle
|
||||
* nextcloud
|
||||
* nodered
|
||||
* OER2Go/RACHEL modules
|
||||
* osm-vector-maps
|
||||
* sugarizer
|
||||
* usb_lib
|
||||
* wordpress
|
||||
|
||||
2. These support "Native" NGINX ***AND*** Apache, a.k.a. "dual support" for legacy testing (if suitable "Shims" from *Section iii.* below are preserved!) Both "Native" NGINX and "Shim" proxying from NGINX to Apache port 8090 *cannot be enabled simultaneously* for these IIAB Apps/Service:<!--But if you want to attempt their "Shim" proxying legacy testing mode, try setting your *primary web server* to Apache using `apache_install: True` and `apache_enabled: True` (and `nginx_enabled: False` to disable NGINX) in [/etc/iiab/local_vars.yml](http://wiki.laptop.org/go/IIAB/FAQ#What_is_local_vars.yml_and_how_do_I_customize_it.3F) before you install IIAB. You may also need to run `cd /opt/iiab/iiab; ./runrole httpd` since this has been removed from [roles/3-base-server/tasks/main.yml](https://github.com/iiab/iiab/blob/master/roles/3-base-server/tasks/main.yml)-->
|
||||
|
||||
|
@ -33,10 +36,7 @@
|
|||
* calibre-web
|
||||
* gitea
|
||||
* kiwix
|
||||
* mediawiki
|
||||
* munin
|
||||
* sugarizer
|
||||
* wordpress
|
||||
|
||||
3. These support Apache but ***NOT*** "Native" NGINX. They use a "Shim" to [proxy_pass](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) from NGINX to Apache on port 8090. See [roles/3-base-server/tasks/main.yml#L11](../3-base-server/tasks/main.yml#L11) for a list of ~6 IIAB Apps/Services that auto-enable Apache.
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
- name: Enable http://box/sugarizer if sugarizer_enabled, by installing {{ nginx_conf_dir }}/sugarizer-nginx.conf from template
|
||||
template:
|
||||
src: sugarizer-nginx.conf
|
||||
src: sugarizer-nginx.conf.j2
|
||||
dest: "{{ nginx_conf_dir }}/sugarizer-nginx.conf" # /etc/nginx/conf.d
|
||||
when: sugarizer_enabled
|
||||
|
||||
|
|
|
@ -158,13 +158,6 @@
|
|||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
# 2020-10-30: PR #2604 tries a cleaner layout, with NGINX only
|
||||
#- name: "Install from template: /etc/{{ apache_conf_dir }}/sugarizer.conf"
|
||||
# template:
|
||||
# src: sugarizer.conf.j2
|
||||
# dest: "/etc/{{ apache_conf_dir }}/sugarizer.conf" # apache2/sites-available
|
||||
# when: apache_installed is defined
|
||||
|
||||
# 3 [WAS 4] STANZAS ADDED BELOW JAN/FEB 2019, HOPING THIS MIGHT "JUST WORK"
|
||||
# WITH FUTURE UPGRADES BEYOND SUGARIZER 1.1?!
|
||||
#
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
when: sugarizer_installed is undefined
|
||||
|
||||
|
||||
- include_tasks: enable-or-disable.yml
|
||||
- name: Enable/Disable/Restart NGINX
|
||||
include_tasks: enable-or-disable.yml
|
||||
|
||||
|
||||
- name: Add 'sugarizer' variable values to {{ iiab_ini_file }}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# sugarizer_port is set to 8089 in /opt/iiab/iiab/vars/default_vars.yml
|
||||
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
|
||||
location /sugarizer {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header X-Script-Name /sugarizer;
|
||||
proxy_pass http://127.0.0.1:8089;
|
||||
}
|
10
roles/sugarizer/templates/sugarizer-nginx.conf.j2
Normal file
10
roles/sugarizer/templates/sugarizer-nginx.conf.j2
Normal file
|
@ -0,0 +1,10 @@
|
|||
# sugarizer_port is set to 8089 in /opt/iiab/iiab/vars/default_vars.yml
|
||||
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
|
||||
|
||||
location /sugarizer {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header X-Script-Name /sugarizer;
|
||||
proxy_pass http://127.0.0.1:{{ sugarizer_port }};
|
||||
}
|
|
@ -112,12 +112,6 @@
|
|||
group: "{{ apache_user }}" # DO WE REALLY STILL WANT THIS FOR NGINX?
|
||||
mode: '0660' # Others strongly recommend '0600' (or do PHP/Apache/NGINX really need group read & write permissions?)
|
||||
|
||||
- name: Install /etc/{{ apache_conf_dir }}/wordpress.conf from template, for http://box{{ wp_url }} via Apache
|
||||
template:
|
||||
src: wordpress.conf.j2
|
||||
dest: "/etc/{{ apache_conf_dir }}/wordpress.conf"
|
||||
when: apache_installed is defined
|
||||
|
||||
|
||||
# RECORD WordPress AS INSTALLED
|
||||
|
||||
|
|
|
@ -30,13 +30,8 @@
|
|||
when: wordpress_installed is undefined
|
||||
|
||||
|
||||
- name: Enable/Disable/Restart Apache if primary
|
||||
include_tasks: apache.yml
|
||||
when: not nginx_enabled
|
||||
|
||||
- name: Enable/Disable/Restart NGINX if primary
|
||||
- name: Enable/Disable/Restart NGINX
|
||||
include_tasks: nginx.yml
|
||||
when: nginx_enabled
|
||||
|
||||
|
||||
- name: Add 'wordpress' variable values to {{ iiab_ini_file }}
|
||||
|
|
Loading…
Add table
Reference in a new issue