Using Sqreen with PHP FPM pools

PHP FPM pools allow many PHP FPM processes to use independant configurations.

Enabling Sqreen for all pools

This is the default behavior. After completion of the Sqreen setup (including launching sqreen-installer), Sqreen protects all the FPM pools.

Enabling Sqreen for a limited number of pools

First, deactivate Sqreen globally in the FPM global configuration. For this, remove the token declaration from the file /etc/php/your PHP version/fpm/conf.d/50-sqreen.ini:

sqreen.token = 'your token'

The token declaration is removed from the global configuration in order to be moved to pool specific configuration.

Then specify you want Sqreen to be disabled:

sqreen.disable = 1

The next step is to activate Sqreen for the pool you need. Let's assume this pool is configured in the file /etc/php/7.0/fpm/pool.d/my.conf, then let's add the following lines:

php_value[sqreen.disable] = 0
php_value[sqreen.token] = 'my token'

Finally, the PHP FPM process need to be restarted.