Overriding php-fpm config best practice?

ansible

#1

I want to customize these values from roles/wordpress-setup/templates/php-fpm.conf.j2:

pm.max_children = 10
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 500

Unlike nginx templates, Trellis docs doesn’t provide information about overriding these settings.

What is the best practice to change these value other than changing the file directly?

Thanks!


#2

That’s the only way right now. Those values need to be converted to variables that have defaults. That would be a useful update if you’d like to do a pull request :+1:


#3

For those who need this immediately, merge this pull request into your trellis

Update: Already merged.


#4

I would like to add pm.status_path = /php-fpm-status to php-fpm.conf.j2, and only for the prod config, is it possible?


#5

This post was flagged by the community and is temporarily hidden.


#6

This is a pretty old thread, and your question is not related to the subject the thread discusses. Questions regarding “which technology is better” are also generally outside the scope of these forms, which we try and keep focused on the Roots stack. If you have specific questions relating to the implementation of mod_php or php-form within Trellis, please create a new thread.