diff --git a/tasks/main.yml b/tasks/main.yml index a23bc0d..b545426 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,6 +10,7 @@ - librsvg - php-legacy-igbinary - php-legacy-redis + - php-legacy-fpm state: present - name: deploy nextcloud php.ini file @@ -47,11 +48,18 @@ src: files/fpm-nextcloud.conf dest: /etc/php-legacy/php-fpm.d/nextcloud.conf -- name: ensure php-fpm-legacy override directory exists +- name: ensure php-fpm override directory exists ansible.builtin.file: path: /etc/systemd/system/php-fpm-legacy.service.d/ state: directory +- name: ensure php-fpm log directory exists + ansible.builtin.file: + path: + - /var/log/php-fpm-legacy/ + - /var/log/php-fpm-legacy/access/ + state: directory + - name: deploy php-fpm systemd override ansible.builtin.copy: src: files/php-fpm-override.conf @@ -59,7 +67,7 @@ #notify php-fpm-legacy - name: deploy nextcloud nginx file - ansible.builtin.copy: + ansible.builtin.template: src: files/nginx-nextcloud.conf dest: /etc/nginx/conf.d/nextcloud.conf #notify nginx diff --git a/files/nginx-nextcloud.conf b/templates/nginx-nextcloud.conf similarity index 94% rename from files/nginx-nextcloud.conf rename to templates/nginx-nextcloud.conf index ad7c95f..5958e88 100644 --- a/files/nginx-nextcloud.conf +++ b/templates/nginx-nextcloud.conf @@ -4,11 +4,11 @@ upstream php-handler { server { listen 8080; - listen 443 ssl;# http2; - server_name cloud.actcur.com ; + listen 443 ssl; + server_name {{ ansible_fqdn }} ; - ssl_certificate /etc/nginx/certs/cloud.actcur.com/fullchain.pem; - ssl_certificate_key /etc/nginx/certs/cloud.actcur.com/privkey.pem; + ssl_certificate /etc/nginx/certs/{{ ansible_fqdn }}.actcur.com/fullchain.pem; + ssl_certificate_key /etc/nginx/certs/{{ ansible_fqdn }}.actcur.com/privkey.pem; ssl_session_cache shared:SSL:10m; # Add headers to serve security related headers