php-fpm per user custom php ini directives

andr1us

New member
Joined
Oct 31, 2014
Messages
1
Hi,

I know that php-fpm pool configuration is read from /usr/local/directadmin/data/users/|USER|/php/php-fpm54.conf file and you can add custom php ini directives. But this file is generated from template and if I add custom lines it will be overwritten.

How to make php-fpm read some additional configuration file per user only if it exists?
 
Hi,

I fixed this by editing the php-fpm template in "/usr/local/directadmin/data/templates/php-fpm.conf" (first copy it to the custom directory).

Code:
|*if USER="username"|
php_admin_value[php_directive] = value
|*endif|

Then run /usr/local/directadmin/custombuild/build rewrite_configs

But, since there are |CUSTOM1| and |CUSTOM2| values in the template, I hope an easier way will be provided (unless there already is but I missed it).

regards,
Stijn
 
Solved it myself

Go to "Custom HTTPD Configuration" and you will be able to also change php-fpm config files per user.

regards
Stijn
 
Solved it myself

Go to "Custom HTTPD Configuration" and you will be able to also change php-fpm config files per user .

regards
Stijn

Hi

Where did you find user custom config for php-fpm?
In php-fpm.conf template file is | CUSTOM1 | tag used . Unfortunatelly the same tag is used in virtual_host2 * .conf . Config added into CUSTOM1 section will be inserted for php-fpm and apache (on the top of virtual host) . This makes error after rewrite_conf ( php-fpm directives are unknown for apache ) .

I do not know who put this tags in two independent configuration files. I think so it can not work .

Maybe custom php-fpm config should be in another way configured ( i know that i can make custom template but it's no sense)

Sorry for my poor english.
Regards
 
Question,

How can I give a user control to this? This is only admin level. PHP-FPM won't allow .htaccess files being used to change specific settings (developers like the error reporting etc being on at times, but want to switch it off by command)
 
Back
Top