Editing PHP-FPM pool settings

Hi,
I’ve tried to add some directives into the /etc/php/7.4/fpm/pool.d/www.conf file, but after seeing that a 500 internal error showed up, I searched in the forum for more information, and I found that as with Nginx, a custom template must be used.

However there’s something that’s not very clear… in the info I’ve found it is said that I should create a copy of both /usr/local/hestia/data/templates/web/php-fpm/default.tpl and PHP-7_4.tpl, into something like:
custom_default.tpl and
custom_PHP-7_4.tpl

and then add custom directives into both files, right?
In this case, will Hestia pick up the right files to load into PHP-FPM configuration?

default.tpl can’t be change for or renamed.

custom_PHP-7_4.tpl should work fine.

1 Like

Hi @eris

Tried to make a copy of PHP-7_4.tpl and changed the value of pm.status_path = /status to pm.status_path = /test-fpm-status, restarted both php-fpm and nginx.

The 500 internal error still shows up…

Looking further into nginx error log, I found:

2021/09/11 22:42:04 [crit] 337169#337169: *39 connect() to unix:/var/run/php/php7.4-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: IP, server: domain.tld, request: "GET /test-fpm-status HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "domain.tld"

Looking for the file php7.4-fpm.sock nothing shows up…

Looking into the directory:

ls -lah /var/run/php

php7.4-fpm-domain.tld.sock
php7.4-fpm.pid
php7.4-fpm-server.domain.tld.sock

There’s no php7.4-fpm.sock there…

Incase of PHP fpm Hestia always create the format:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.