diff --git a/tasks/php.yml b/tasks/php.yml index abfa7dad0adacad3eb487dca0111cc0ac8d1f4e0..b6aadec188ab408d0b71a8fd5c11dd2bd6656bf9 100644 --- a/tasks/php.yml +++ b/tasks/php.yml @@ -9,6 +9,7 @@ - php5 - php-apc - php-soap + - php5-cgi - php5-mysql - php5-xmlrpc - php5-gd @@ -23,10 +24,13 @@ notify: - "PHP | Restart Apache" -# TODO: Upgrade APCu on Ubuntu 14.04 -# @see https://github.com/owncloud/core/issues/14175#issuecomment-74573088 -# wget https://launchpad.net/~ondrej/+archive/ubuntu/php5/+build/6149263/+files/php5-apcu_4.0.6-1%2Bdeb.sury.org~utopic%2B1_amd64.deb -# sudo dpkg -i php5-apcu_4.0.6-1+deb.sury.org~utopic+1_amd64.deb +- name: "PHP | Enable Apache modules" + apache2_module: + name={{ item }} + state=present + with_items: + - fcgid + notify: "Apache | Restart Apache" - name: "PHP | Configuration file, php.ini" template: @@ -38,6 +42,21 @@ notify: - "PHP | Restart Apache" +- name: "PHP | Configuration file, fcgid.conf" + template: + src=fcgid.conf + dest=/etc/apache2/mods-available/fcgid.conf + owner=root + group=root + mode=0644 + notify: + - "PHP | Restart Apache" + +# TODO: Upgrade APCu on Ubuntu 14.04 +# @see https://github.com/owncloud/core/issues/14175#issuecomment-74573088 +# wget https://launchpad.net/~ondrej/+archive/ubuntu/php5/+build/6149263/+files/php5-apcu_4.0.6-1%2Bdeb.sury.org~utopic%2B1_amd64.deb +# sudo dpkg -i php5-apcu_4.0.6-1+deb.sury.org~utopic+1_amd64.deb + - name: "PHP | Cache configuration file, apc.ini" template: src=etc-php5-conf-d-apc.ini diff --git a/templates/fcgid.conf b/templates/fcgid.conf new file mode 100644 index 0000000000000000000000000000000000000000..2e9008a508111b59eee269c1e24c3e557d0c62e4 --- /dev/null +++ b/templates/fcgid.conf @@ -0,0 +1,14 @@ +<IfModule mod_fcgid.c> + FcgidConnectTimeout 20 + + DefaultMinClassProcessCount 0 + IdleTimeout 300 + IdleScanInterval 30 + MaxProcessCount 15 + MaxRequestsPerProcess 500 + PHP_Fix_Pathinfo_Enable 1 + + <IfModule mod_mime.c> + AddHandler fcgid-script .fcgi + </IfModule> +</IfModule>