HestiaCP + PHP-FPM: Custom Backend Attempt and Issues Encountered

Hello,

I am setting up a PHP-FPM–based system on Debian 12 using HestiaCP.
The architecture consists of Nginx (reverse proxy), Apache (backend), and PHP-FPM, with MultiPHP enabled.

During the setup, I tried creating a custom backend/template for PHP 7.4
(for example, something like PHP-7_4-video) to use on a per-domain basis.

However, in practice I encountered several issues, including:

PHP-FPM pools being removed or not properly regenerated after domain rebuilds

Socket conflicts (.sock files)

PHP-FPM services entering restart loops when MultiPHP was enabled

Occasional 500 Internal Server Errors

Because of these issues, I decided to abandon the custom backend approach and revert the domain back to the standard PHP-7_4 backend, after which the system became stable.

My Question :smiling_face_with_three_hearts:

In systems running HestiaCP:

Is creating custom PHP-FPM backends/templates per PHP version a recommended approach?

Or should the PHP-FPM backend layer be kept as close as possible to the default configuration due to Hestia’s internal architecture?

More specifically:

In which scenarios do domain-level custom backends work reliably with HestiaCP?

When using MultiPHP, is there a recommended method to avoid backend/template and socket conflicts?

In this scenario, was there a different or more appropriate approach that should have been taken?

I would appreciate insights from experienced users and developers.

Hi,

You are using the wrong format, the name of the template should be:

video-PHP-7_4.tpl

Thank you for the clarification.

You were right — the issue was caused by using an incorrect template naming format. After renaming the template to the correct format (video-PHP-7_4.tpl) and rebuilding the domain, the backend started working as expected.

The custom PHP-FPM backend was tested successfully, socket conflicts were resolved, and the system is now stable.

Thanks again for the correct guidance.

1 Like