Hi!
After each update of the panel, my server crashes, because the nginx template is reset to the default template /usr/local/hestia/data/templates/web/nginx/php-fpm/default.stpl
I try to make my own nginx template for web domains, but how to get the php version in it?
How replace php version in nginx.tpl for current used php-version on website?
set $php_sock unix:/run/php/php7.4-fpm-%domain%.sock;
like this
set $php_sock unix:/run/php/php%backend_version%-fpm-%domain%.sock;
This in php-fpm PHP-7_4.tpl, but it doesn’t work in nginx.tpl
/run/php/php%backend_version%-fpm-%domain%.sock
nginx does not know about this variable %backend_version%
The whole Internet shows an example with an abstract socket
/var/run/php-fpm/php-fpm.sock
but in practice this does not work, all sockets are divided by web domains
/run/php/php7.4-fpm-example.com.sock;