Custom php-fpm.conf in custombuild

inomi13

Verified User
Joined
Jan 7, 2022
Messages
162
In file /usr/local/php81/etc/php-fpm.conf I have included path to my configuration. To prevent remove this value I created path /usr/local/directadmin/custombuild/custom/fpm/conf and I copied here file php-fpm.conf.81 from path /usr/local/directadmin/custombuild/configure/fpm/conf. After I used ./build rewrite_confs and it's works

I need feedback if my solution is correct and won't I have any an issue with PHP 8.1 after update PHP 8.1 or update directadmin or any features of PHP 8.1?
 
Might be a correct solution if it works. However, this will only work for PHP 8.1 in this case.

If you want this for this PHP version and all other PHP versions for now and in the future globally, there is a better solution.
Check this:
 
Might be a correct solution if it works. However, this will only work for PHP 8.1 in this case.
I need only this version so you think my solution is correct ?
 
so you think my solution is correct ?
According to the docs a /custom/fpm directory could be made and it's working so I think yes.

If you remove the setting from the original php-fpm81.conf and rebuild php-fpm81 again (and maybe rewrite_confs again too) and the setting will be present again after that, then you can be sure it's correct.
 
Thank you for your answer. I had a concern that file php-fpm.conf always change after update php 8.1 but I think it is a constant file and it isn’t change after update PHP like file httpd.conf, so that I did this custom configuration. What do you think?
 
I wouldn't bet on that. The httpd.conf also isn't changed on every update, but happens once a while, most likely that is also the case for php-fpm.conf files otherwise there would not be a need for custom files.
So imho you're concern is still valid and you made a good choice creating the custom file.
 
note: from comment post#2, it globals for per-user config, But target of this thread, it wants real globals file. ( Doesn't do anything with per-user config ).
 
it globals for per-user config
No it globals for a real global config. The first line in my link is real global for everything as it says:
To create true global CUSTOM1 and CUSTOM2 pre tokens, loaded in before other tokens for the php-fpm.conf templates, all Users, all php versions, create the following files:
/usr/local/directadmin/data/templates/custom/php-fpm.conf.custom1
/usr/local/directadmin/data/templates/custom/php-fpm.conf.custom2

The per user global config is just below that.
 
@Richard G
Real config locate here "/usr/local/php81/etc/php-fpm.conf", And doesn't do anything with template token. It just include all user config with "*" regex.
 
Real config locate here
Yes I know. But I think I'm probablymissing something as I only gave an global alternative if required according to the docs. It's not only per-user-config. So I still don't understand your per-user-config reply, but that doesn't matter. ;)

It just include all user config with "*" regex.
That's possible, I can only see what's in the docs, I don't use this.
 
Back
Top