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

Switch to PHP-FPM

parent 6c667a1b
Branches
No related tags found
No related merge requests found
......@@ -8,6 +8,9 @@
with_items:
- apache2
- apache2-utils
- apache2-mpm-event
- libapache2-mod-fastcgi
- php5-fpm
notify: "Apache | Restart Apache"
- name: "Apache | Enable some required modules"
......@@ -18,8 +21,32 @@
- rewrite
- vhost_alias
- ssl
- actions
- fastcgi
- alias
notify: "Apache | Restart Apache"
- name: "Apache | Disable modules"
apache2_module:
name={{ item }}
state=absent
with_items:
- php5
notify: "Apache | Restart Apache"
- name: "Apache | Configuration of PHP-FPM"
template:
src=etc-apache2-conf-available-php5-fpm
dest=/etc/apache2/conf-available/php5-fpm{{ apache_conf_ext }}
owner=root
group=root
mode=0644
notify:
- "Apache | Restart Apache"
- name: "Apache | Enable PHP-FPM configuration"
command: a2enconf php5-fpm
- name: "Apache | Turn on Extended Status"
lineinfile:
dest=/etc/apache2/apache2.conf
......
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
<Directory /usr/lib/cgi-bin>
Require all granted
</Directory>
</IfModule>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment