From bf3b646dbfee9c151e29e6d87543d4ea6e31c23d Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 23 Feb 2024 21:19:15 -0700 Subject: [PATCH] In Debian 12: Expect new PHP version. Use Apache CGId module. --- README.org | 22 ++++++++++++++++++++++ roles_t/core/tasks/main.yml | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/README.org b/README.org index aa32c53..02a67ea 100644 --- a/README.org +++ b/README.org @@ -3519,6 +3519,17 @@ interfere with mapping URLs to the correct virtual host. name: "{{ item }}" loop: [ userdir, cgi ] notify: Restart Apache2. + when: ansible_distribution != 'Debian' + or 12 > ansible_distribution_major_version|int + +- name: Enable Apache2 modules (Debian 12). + become: yes + apache2_module: + name: "{{ item }}" + loop: [ userdir, cgid ] + notify: Restart Apache2. + when: ansible_distribution == 'Debian' + and 11 < ansible_distribution_major_version|int #+END_SRC With Apache installed there is a =/etc/apache/sites-available/= @@ -4347,6 +4358,17 @@ performance, as recommended by Nextcloud. path: /etc/php/7.4/apache2/php.ini regexp: memory_limit *= line: memory_limit = 512M + when: ansible_distribution != 'Debian' + or 12 > ansible_distribution_major_version|int + +- name: Set PHP memory_limit for Nextcloud (Debian 12). + become: yes + lineinfile: + path: /etc/php/8.2/apache2/php.ini + regexp: memory_limit *= + line: memory_limit = 512M + when: ansible_distribution == 'Debian' + and 11 < ansible_distribution_major_version|int - name: Include PHP parameters for Nextcloud. become: yes diff --git a/roles_t/core/tasks/main.yml b/roles_t/core/tasks/main.yml index 872a72d..6256e56 100644 --- a/roles_t/core/tasks/main.yml +++ b/roles_t/core/tasks/main.yml @@ -505,6 +505,17 @@ name: "{{ item }}" loop: [ userdir, cgi ] notify: Restart Apache2. + when: ansible_distribution != 'Debian' + or 12 > ansible_distribution_major_version|int + +- name: Enable Apache2 modules (Debian 12). + become: yes + apache2_module: + name: "{{ item }}" + loop: [ userdir, cgid ] + notify: Restart Apache2. + when: ansible_distribution == 'Debian' + and 11 < ansible_distribution_major_version|int - name: Install live web site. become: yes @@ -808,6 +819,17 @@ path: /etc/php/7.4/apache2/php.ini regexp: memory_limit *= line: memory_limit = 512M + when: ansible_distribution != 'Debian' + or 12 > ansible_distribution_major_version|int + +- name: Set PHP memory_limit for Nextcloud (Debian 12). + become: yes + lineinfile: + path: /etc/php/8.2/apache2/php.ini + regexp: memory_limit *= + line: memory_limit = 512M + when: ansible_distribution == 'Debian' + and 11 < ansible_distribution_major_version|int - name: Include PHP parameters for Nextcloud. become: yes -- 2.25.1