mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #1165 from holta/wordpress-pro
Proposed rewrite of PR #1161: apache_raise_php_limits for WordPress & Moodle
This commit is contained in:
commit
fa0a0c2c77
9 changed files with 72 additions and 51 deletions
6
roles/httpd/defaults/main.yml
Normal file
6
roles/httpd/defaults/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Make this False to disable http://box/common/services/power_off.php button:
|
||||||
|
apache_allow_sudo: True
|
||||||
|
|
||||||
|
# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147
|
||||||
|
# WARNING: Enabling this (might) cause excess use of RAM or other resources?
|
||||||
|
apache_raise_php_limits: False
|
|
@ -69,7 +69,22 @@
|
||||||
with_items:
|
with_items:
|
||||||
- { src: '010-iiab.conf.j2', dest: '/etc/{{ apache_config_dir }}/010-iiab.conf', mode: '0755' }
|
- { src: '010-iiab.conf.j2', dest: '/etc/{{ apache_config_dir }}/010-iiab.conf', mode: '0755' }
|
||||||
- { src: 'proxy_ajp.conf.j2', dest: '/etc/{{ apache_config_dir }}/proxy_ajp.conf', mode: '0644' }
|
- { src: 'proxy_ajp.conf.j2', dest: '/etc/{{ apache_config_dir }}/proxy_ajp.conf', mode: '0644' }
|
||||||
- { src: 'php.ini.j2', dest: '/etc/php.ini', mode: '0644' }
|
#- { src: 'php.ini.j2', dest: '/etc/php.ini', mode: '0644' } # @jvonau suggests removing this in https://github.com/iiab/iiab/issues/1147
|
||||||
|
|
||||||
|
# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147
|
||||||
|
# WARNING: Enabling this (might) cause excess use of RAM or other resources?
|
||||||
|
- name: Raise php.ini limits if using WordPress and/or Moodle intensively
|
||||||
|
lineinfile:
|
||||||
|
path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini"
|
||||||
|
regexp: "{{ item.regexp }}"
|
||||||
|
line: "{{ item.line }}"
|
||||||
|
when: apache_raise_php_limits
|
||||||
|
with_items:
|
||||||
|
- { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 64M ; default is 2M' }
|
||||||
|
- { regexp: '^post_max_size', line: 'post_max_size = 128M ; default is 8M' }
|
||||||
|
- { regexp: '^memory_limit', line: 'memory_limit = 256M ; default is 128M' }
|
||||||
|
- { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' }
|
||||||
|
- { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' }
|
||||||
|
|
||||||
# remove symlinks for mpm-event, replace with mpm-prefork
|
# remove symlinks for mpm-event, replace with mpm-prefork
|
||||||
- name: Remove mpm event links (debuntu)
|
- name: Remove mpm event links (debuntu)
|
||||||
|
@ -207,10 +222,10 @@
|
||||||
src: 020_apache_poweroff.j2
|
src: 020_apache_poweroff.j2
|
||||||
dest: /etc/sudoers.d/020_apache_poweroff
|
dest: /etc/sudoers.d/020_apache_poweroff
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: allow_apache_sudo
|
when: apache_allow_sudo
|
||||||
|
|
||||||
- name: Remove apache_user permission to poweroff
|
- name: Remove apache_user permission to poweroff
|
||||||
file:
|
file:
|
||||||
dest: /etc/sudoers.d/020_apache_poweroff
|
dest: /etc/sudoers.d/020_apache_poweroff
|
||||||
state: absent
|
state: absent
|
||||||
when: not allow_apache_sudo
|
when: not apache_allow_sudo
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
|
#moodle_install: True
|
||||||
|
#moodle_enabled: False
|
||||||
|
|
||||||
|
# If using Moodle intensively, consider setting apache_raise_php_limits in:
|
||||||
|
# /etc/iiab/local_vars.yml
|
||||||
|
|
||||||
moodle_version: 35
|
moodle_version: 35
|
||||||
#moodle_repo_url: "https://github.com/moodle/moodle.git"
|
#moodle_repo_url: "https://github.com/moodle/moodle.git"
|
||||||
moodle_repo_url: "git://git.moodle.org/moodle.git"
|
moodle_repo_url: "git://git.moodle.org/moodle.git"
|
||||||
moodle_base: "{{ iiab_base }}/moodle"
|
moodle_base: "{{ iiab_base }}/moodle"
|
||||||
#moodle_user: moodle
|
#moodle_user: moodle
|
||||||
#moodle_install: True
|
|
||||||
#moodle_enabled: False
|
|
||||||
moodle_data: '{{ content_base }}/moodle'
|
moodle_data: '{{ content_base }}/moodle'
|
||||||
moodle_database_name: moodle
|
moodle_database_name: moodle
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
wordpress_install: True
|
wordpress_install: True
|
||||||
wordpress_enabled: True
|
wordpress_enabled: True
|
||||||
|
|
||||||
# For schools that use WordPress intensively. WARNING: Enabling this (might)
|
# If using WordPress intensively, consider setting apache_raise_php_limits in:
|
||||||
# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147
|
# /etc/iiab/local_vars.yml
|
||||||
wordpress_raise_php_limits: False
|
|
||||||
|
|
||||||
wordpress_download_base_url: https://wordpress.org
|
wordpress_download_base_url: https://wordpress.org
|
||||||
wordpress_src: latest.tar.gz
|
wordpress_src: latest.tar.gz
|
||||||
|
|
|
@ -47,21 +47,6 @@
|
||||||
mode: 0664
|
mode: 0664
|
||||||
keep_newer: yes
|
keep_newer: yes
|
||||||
|
|
||||||
# For schools that use WordPress intensively. WARNING: Enabling this (might)
|
|
||||||
# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147
|
|
||||||
- name: Raise php.ini limits in schools that use WordPress intensively
|
|
||||||
lineinfile:
|
|
||||||
path: "/etc/php/{{ php_version }}/{{ apache_service }}/php.ini"
|
|
||||||
regexp: "{{ item.regexp }}"
|
|
||||||
line: "{{ item.line }}"
|
|
||||||
when: wordpress_raise_php_limits
|
|
||||||
with_items:
|
|
||||||
- { regexp: '^upload_max_filesize', line: 'upload_max_filesize = 64M ; default is 2M' }
|
|
||||||
- { regexp: '^post_max_size', line: 'post_max_size = 128M ; default is 8M' }
|
|
||||||
- { regexp: '^memory_limit', line: 'memory_limit = 256M ; default is 128M' }
|
|
||||||
- { regexp: '^max_execution_time', line: 'max_execution_time = 300 ; default is 30' }
|
|
||||||
- { regexp: '^max_input_time', line: 'max_input_time = 300 ; default is 60' }
|
|
||||||
|
|
||||||
# - name: Rename /library/wordpress* to /library/wordpress
|
# - name: Rename /library/wordpress* to /library/wordpress
|
||||||
# shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi
|
# shell: if [ ! -d {{ wp_abs_path }} ]; then mv {{ wp_abs_path }}* {{ wp_abs_path }}; fi
|
||||||
|
|
||||||
|
|
|
@ -160,10 +160,14 @@ wan_nameserver:
|
||||||
|
|
||||||
# 3-BASE-SERVER
|
# 3-BASE-SERVER
|
||||||
|
|
||||||
# Make this False to disable http://box/common/services/power_off.php button:
|
# roles/httpd (Apache configuration) runs here
|
||||||
allow_apache_sudo: True
|
|
||||||
|
|
||||||
# roles/httpd runs here
|
# Make this False to disable http://box/common/services/power_off.php button:
|
||||||
|
apache_allow_sudo: True
|
||||||
|
|
||||||
|
# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147
|
||||||
|
# WARNING: Enabling this (might) cause excess use of RAM or other resources?
|
||||||
|
apache_raise_php_limits: False
|
||||||
|
|
||||||
# roles/iiab-admin runs here
|
# roles/iiab-admin runs here
|
||||||
|
|
||||||
|
@ -280,9 +284,7 @@ nextcloud_enabled: False
|
||||||
# WordPress
|
# WordPress
|
||||||
wordpress_install: True
|
wordpress_install: True
|
||||||
wordpress_enabled: False
|
wordpress_enabled: False
|
||||||
# For schools that use WordPress intensively. WARNING: Enabling this (might)
|
# If using WordPress intensively, consider setting apache_raise_php_limits above
|
||||||
# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147
|
|
||||||
wordpress_raise_php_limits: False
|
|
||||||
|
|
||||||
|
|
||||||
# 7-EDU-APPS
|
# 7-EDU-APPS
|
||||||
|
@ -312,6 +314,7 @@ iiab_zim_path: /library/zims
|
||||||
# Moodle
|
# Moodle
|
||||||
moodle_install: False
|
moodle_install: False
|
||||||
moodle_enabled: False
|
moodle_enabled: False
|
||||||
|
# If using Moodle intensively, consider setting apache_raise_php_limits above
|
||||||
|
|
||||||
# Sugarizer
|
# Sugarizer
|
||||||
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
|
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
|
||||||
|
|
|
@ -77,7 +77,11 @@ dansguardian_enabled: True
|
||||||
# 3-BASE-SERVER
|
# 3-BASE-SERVER
|
||||||
|
|
||||||
# Make this False to disable http://box/common/services/power_off.php button:
|
# Make this False to disable http://box/common/services/power_off.php button:
|
||||||
allow_apache_sudo: True
|
apache_allow_sudo: True
|
||||||
|
|
||||||
|
# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147
|
||||||
|
# WARNING: Enabling this (might) cause excess use of RAM or other resources?
|
||||||
|
apache_raise_php_limits: False
|
||||||
|
|
||||||
# roles/mysql runs here (mandatory)
|
# roles/mysql runs here (mandatory)
|
||||||
|
|
||||||
|
@ -154,9 +158,7 @@ nextcloud_enabled: True
|
||||||
|
|
||||||
wordpress_install: True
|
wordpress_install: True
|
||||||
wordpress_enabled: True
|
wordpress_enabled: True
|
||||||
# For schools that use WordPress intensively. WARNING: Enabling this (might)
|
# If using WordPress intensively, consider setting apache_raise_php_limits above
|
||||||
# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147
|
|
||||||
wordpress_raise_php_limits: False
|
|
||||||
|
|
||||||
|
|
||||||
# 7-EDU-APPS
|
# 7-EDU-APPS
|
||||||
|
@ -176,6 +178,7 @@ kiwix_enabled: True
|
||||||
# Warning: Moodle is a serious LMS, that takes a while to install
|
# Warning: Moodle is a serious LMS, that takes a while to install
|
||||||
moodle_install: True
|
moodle_install: True
|
||||||
moodle_enabled: True
|
moodle_enabled: True
|
||||||
|
# If using Moodle intensively, consider setting apache_raise_php_limits above
|
||||||
|
|
||||||
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
|
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
|
||||||
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
|
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
|
||||||
|
|
|
@ -77,7 +77,11 @@ dansguardian_enabled: False
|
||||||
# 3-BASE-SERVER
|
# 3-BASE-SERVER
|
||||||
|
|
||||||
# Make this False to disable http://box/common/services/power_off.php button:
|
# Make this False to disable http://box/common/services/power_off.php button:
|
||||||
allow_apache_sudo: True
|
apache_allow_sudo: True
|
||||||
|
|
||||||
|
# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147
|
||||||
|
# WARNING: Enabling this (might) cause excess use of RAM or other resources?
|
||||||
|
apache_raise_php_limits: False
|
||||||
|
|
||||||
# roles/mysql runs here (mandatory)
|
# roles/mysql runs here (mandatory)
|
||||||
|
|
||||||
|
@ -154,9 +158,7 @@ nextcloud_enabled: True
|
||||||
|
|
||||||
wordpress_install: True
|
wordpress_install: True
|
||||||
wordpress_enabled: True
|
wordpress_enabled: True
|
||||||
# For schools that use WordPress intensively. WARNING: Enabling this (might)
|
# If using WordPress intensively, consider setting apache_raise_php_limits above
|
||||||
# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147
|
|
||||||
wordpress_raise_php_limits: False
|
|
||||||
|
|
||||||
|
|
||||||
# 7-EDU-APPS
|
# 7-EDU-APPS
|
||||||
|
@ -176,6 +178,7 @@ kiwix_enabled: True
|
||||||
# Warning: Moodle is a serious LMS, that takes a while to install
|
# Warning: Moodle is a serious LMS, that takes a while to install
|
||||||
moodle_install: False
|
moodle_install: False
|
||||||
moodle_enabled: False
|
moodle_enabled: False
|
||||||
|
# If using Moodle intensively, consider setting apache_raise_php_limits above
|
||||||
|
|
||||||
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
|
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
|
||||||
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
|
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
|
||||||
|
|
|
@ -77,7 +77,11 @@ dansguardian_enabled: False
|
||||||
# 3-BASE-SERVER
|
# 3-BASE-SERVER
|
||||||
|
|
||||||
# Make this False to disable http://box/common/services/power_off.php button:
|
# Make this False to disable http://box/common/services/power_off.php button:
|
||||||
allow_apache_sudo: True
|
apache_allow_sudo: True
|
||||||
|
|
||||||
|
# For schools that use WordPress and/or Moodle intensively. See iiab/iiab #1147
|
||||||
|
# WARNING: Enabling this (might) cause excess use of RAM or other resources?
|
||||||
|
apache_raise_php_limits: False
|
||||||
|
|
||||||
# roles/mysql runs here (mandatory)
|
# roles/mysql runs here (mandatory)
|
||||||
|
|
||||||
|
@ -154,9 +158,7 @@ nextcloud_enabled: False
|
||||||
|
|
||||||
wordpress_install: False
|
wordpress_install: False
|
||||||
wordpress_enabled: False
|
wordpress_enabled: False
|
||||||
# For schools that use WordPress intensively. WARNING: Enabling this (might)
|
# If using WordPress intensively, consider setting apache_raise_php_limits above
|
||||||
# cause excess use of RAM or other resources? github.com/iiab/iiab/issues/1147
|
|
||||||
wordpress_raise_php_limits: False
|
|
||||||
|
|
||||||
|
|
||||||
# 7-EDU-APPS
|
# 7-EDU-APPS
|
||||||
|
@ -176,6 +178,7 @@ kiwix_enabled: True
|
||||||
# Warning: Moodle is a serious LMS, that takes a while to install
|
# Warning: Moodle is a serious LMS, that takes a while to install
|
||||||
moodle_install: False
|
moodle_install: False
|
||||||
moodle_enabled: False
|
moodle_enabled: False
|
||||||
|
# If using Moodle intensively, consider setting apache_raise_php_limits above
|
||||||
|
|
||||||
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
|
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
|
||||||
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
|
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue