Search code examples
chef-infraphpberkshelf

How can I edit `www.conf` for php-fpm in chef recipe?


By using Berkshelf I'm installing php-fpm.

And I want to comment out following lines in /etc/php-fpm.d/www.conf:

;listen.owner = www-data
;listen.group = www-data

But I couldn't find where should I edit in cookbooks/php-fpm directory. And I don't know if it is ok to edit files directly that is created by Berkshelf automatically.

Where and how can I reflect that change?

Edit

The problem is there is no www.conf in php-fpm template. I think this file is somehow generated dynamically. Does anyone know how the file www.conf generated?

This is the result of find.

find . -name '*.conf.*'
./templates/default/pool.conf.erb
./templates/default/php-fpm.conf.erb

Solution

  • I added this line to *.json node config file, then the values are override.

    php-fpm": { "listen_owner": "nginx", "listen_group": "nginx" },