Adoptable Cookbooks List

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

rackspace_apache_php-cookbook

A cookbook to provide a web server able to serve php pages with Apache and PHP fpm.
It relies on apache2 cookbook and php-fpm. Those cookbooks are pinned on well known working minor version to prevent breaking changes.
In addition (even if this is not a requirement), the cookbook will install php packages through PHP cookbook. Indeed most of the time you will need php::default in your role which will conflict with the php-fpm package if they are different.
You can disable the installation of php packages with node['rackspace_apache_php']['php_packages_install']['enable'].

Supported Platforms

Attributes

node['rackspace_apache_php']['php_version'] : Which PHP version to install, default to PHP 5.6

node['rackspace_apache_php']['php-fpm']['default_pool']['enable'] : Should it enable a default PHP-FPM pool which listens on a unix socket, defaults to 'true' (change it to false if you want to manage your own PHP-FPM pools)

node['rackspace_apache_php']['php_handler']['enable'] : Should it enable Apache PHP handler (applied in "conf.d", so it will be available in EVERY vhost, if you want to manage your own handler configuration, set this attribute to false)

node['rackspace_apache_php']['php_handler']['cookbook'] : Where to find the handler configuration , default to rackspace_apache_php cookbook

node['rackspace_apache_php']['php_handler']['template'] : Where to find the handler configuration , default to php-handler.conf.erb

Usage

Place a dependency on the rackspace_apache_php cookbook in your cookbook's metadata.rb
depends 'rackspace_apache_php'
Then, add rackspace_apache_php::default to your runlist

You can change any of the apache2,php-fpm and php cookbook attributes to tune rackspace_apache_php configuration.
** However you should not change ** ['php-fpm']['package_name'],['php-fpm']['service_name'] or ['php']['packages'] (as they are part of this cookbook logic) without checking it works.

In scope

The goal of this library is to do the basic configuration to serve PHP pages through Apache. It will only configure apache2 and the default php handler, users are free to configure their vhost if they need anything more specific.

More in details it :

Installs and configure Apache2 web server

Installs and configure php-fpm

Installs and configure php

Configures Apache2 to serve php pages through php-fpm (in conf.d)

Gets the correct packages and change the configuration according to the php/apache version

Out of scope

Virtual Host are not managed by this cookbook, the configuration provided by this cookbook should not prevent users to extend php or php-fpm configuration.
As many features as possible should have a flag to enable/disable them, it will allow to enjoy some parts of the work done by this cookbook (get the correct packages by example) but still be able to configure your own php-fpm pools.