From 359f2f68d719776ab237f95aac74363d1f9081a6 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Tue, 24 May 2022 15:36:22 +0200 Subject: [PATCH] nextcloud: update PHP to 8.1 --- roles/nextcloud/files/www.conf | 2 +- roles/nextcloud/handlers/main.yml | 4 +- roles/nextcloud/tasks/main.yml | 69 +++++++++++++++--------------- roles/nextcloud/templates/vhost.j2 | 8 ++-- 4 files changed, 42 insertions(+), 41 deletions(-) diff --git a/roles/nextcloud/files/www.conf b/roles/nextcloud/files/www.conf index 0a78e4d..a1bcd70 100644 --- a/roles/nextcloud/files/www.conf +++ b/roles/nextcloud/files/www.conf @@ -230,7 +230,7 @@ pm.max_spare_servers = 15 ; last request memory: 0 ; ; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php/8.0/fpm/status.html +; It's available in: /usr/share/php/8.1/fpm/status.html ; ; Note: The value must start with a leading slash (/). The value can be ; anything, but it may not be a good idea to use the .php extension or it diff --git a/roles/nextcloud/handlers/main.yml b/roles/nextcloud/handlers/main.yml index a24f652..ebce8cb 100644 --- a/roles/nextcloud/handlers/main.yml +++ b/roles/nextcloud/handlers/main.yml @@ -3,5 +3,5 @@ - name: Restart nginx service: name=nginx state=restarted -- name: Restart php8.0-fpm - service: name=php8.0-fpm state=restarted +- name: Restart php8.1-fpm + service: name=php8.1-fpm state=restarted diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index dcf36ce..5c5662b 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -15,32 +15,33 @@ - name: Install packages apt: name: - - php-redis - - php8.0 - - php8.0-apcu - - php8.0-bcmath - - php8.0-bz2 - - php8.0-cli - - php8.0-common - - php8.0-curl - - php8.0-dev - - php8.0-fpm - - php8.0-gd - - php8.0-gmp - - php8.0-imap - - php8.0-intl - - php8.0-ldap - - php8.0-mbstring - - php8.0-mysql - - php8.0-opcache - - php8.0-pgsql - - php8.0-readline - - php8.0-soap - - php8.0-sqlite3 - - php8.0-tidy - - php8.0-xml - - php8.0-xmlrpc - - php8.0-zip + - php8.1 + - php8.1-apcu + - php8.1-bcmath + - php8.1-bz2 + - php8.1-cli + - php8.1-common + - php8.1-curl + - php8.1-dev + - php8.1-fpm + - php8.1-gd + - php8.1-gmp + - php8.1-imagick + - php8.1-imap + - php8.1-intl + - php8.1-ldap + - php8.1-mbstring + - php8.1-mysql + - php8.1-opcache + - php8.1-pgsql + - php8.1-readline + - php8.1-redis + - php8.1-soap + - php8.1-sqlite3 + - php8.1-tidy + - php8.1-xml + - php8.1-xmlrpc + - php8.1-zip - postgresql - python3-psycopg2 @@ -69,20 +70,20 @@ template: src=vhost.j2 dest=/etc/nginx/sites-available/nextcloud notify: Restart nginx -- name: Configure php8.0-fpm - copy: src=www.conf dest=/etc/php/8.0/fpm/pool.d/www.conf - notify: Restart php8.0-fpm +- name: Configure php8.1-fpm + copy: src=www.conf dest=/etc/php/8.1/fpm/pool.d/www.conf + notify: Restart php8.1-fpm -- name: Configure php8.0 opcache - copy: src=opcache.ini dest=/etc/php/8.0/mods-available/opcache.ini - notify: Restart php8.0-fpm +- name: Configure php8.1 opcache + copy: src=opcache.ini dest=/etc/php/8.1/mods-available/opcache.ini + notify: Restart php8.1-fpm - name: Enable vhost file: src=/etc/nginx/sites-available/nextcloud dest=/etc/nginx/sites-enabled/nextcloud state=link notify: Restart nginx -- name: Start php8.0-fpm - service: name=php8.0-fpm state=started enabled=yes +- name: Start php8.1-fpm + service: name=php8.1-fpm state=started enabled=yes - name: Start PostgreSQL service: name=postgresql state=started enabled=yes diff --git a/roles/nextcloud/templates/vhost.j2 b/roles/nextcloud/templates/vhost.j2 index fd45fd2..dc23e7d 100644 --- a/roles/nextcloud/templates/vhost.j2 +++ b/roles/nextcloud/templates/vhost.j2 @@ -49,7 +49,7 @@ server { index index.php index.html /index.php$request_uri; - location ^~ /loleaflet { + location ^~ /browser { proxy_pass http://localhost:9980; proxy_set_header Host $http_host; } @@ -64,7 +64,7 @@ server { proxy_set_header Host $http_host; } - location ~ ^/lool/(.*)/ws$ { + location ~ ^/cool/(.*)/ws$ { proxy_pass http://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; @@ -72,12 +72,12 @@ server { proxy_read_timeout 36000s; } - location ~ ^/lool { + location ~ ^/(c|l)ool { proxy_pass http://localhost:9980; proxy_set_header Host $http_host; } - location ^~ /lool/adminws { + location ^~ /cool/adminws { proxy_pass http://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade";