Skip to content
Snippets Groups Projects
Commit 6fd155d1 authored by jurgenhaas's avatar jurgenhaas
Browse files

apache#10 Fix default configuration for FPM and Apache

parent 73fee769
No related branches found
No related tags found
No related merge requests found
...@@ -159,11 +159,13 @@ ...@@ -159,11 +159,13 @@
- name: FPM Default Pool Configuration - name: FPM Default Pool Configuration
template: template:
src: php_pool.conf src: php_pool.conf
dest: /etc/{{ php_base_dir }}/fpm/pool.d/www.conf dest: /etc/{{ php_base_dir }}/fpm/pool.d/default.conf
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
when: (php_version_main|default(7) == 7) and php_fpm when: (php_version_main|default(7) == 7) and php_fpm
notify:
- Restart PHP-FPM
- block: - block:
- name: Set facts for PHP 7 - name: Set facts for PHP 7
...@@ -186,6 +188,22 @@ ...@@ -186,6 +188,22 @@
mode: 0644 mode: 0644
notify: notify:
- Initial Logrotate - Initial Logrotate
- name: Adjust apache config for default site
lineinfile:
dest: /etc/apache2/sites-available/{{ apache_conf_default_prefix }}default{{ apache_conf_ext }}
regexp: '{{ item.regexp }}'
line: '{{ item.line }}'
with_items:
- regexp: 'ProxyPassMatch'
line: ' ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:{{ php_fpm_port|default(9999) }}/var/www{{apache_server_default_root}}/$1'
- regexp: '<Proxy fcgi'
line: ' <Proxy fcgi://127.0.0.1:{{ php_fpm_port|default(9999) }}>'
when: apache_server_default
notify:
- Restart PHP-FPM
- Restart Apache
when: php_fpm when: php_fpm
tags: tags:
- logrotate - logrotate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment