New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

PHP-FPM7.4 How can I set php.ini files per domain name

Started by NIIcK, July 28, 2021, 07:03:51 AM

Previous topic - Next topic

NIIcK

Hello,

I want to use php-fpm and to set a php.ini per each domain name (each php-fpm session to be served according to the ini file it has, per domain name).

Currently, even though the domains I have are running php-fpm, they all use the same configuration file loaded from

/opt/alt/php-fpm74/usr/php/php.ini


Considering I have different users using the domain names, sometimes several domain names per user, is it possible to serve PHP-FPM from individual ini files for each domain name and if so where/what should I set up?

Thank you!

Monclee

I have the same question, did you find the answer?

I am using PHP-FPM , and i need to set memory limit changes for just one domain. Thats not on CWP wiki as far as i know.

overseer

Look here:
/opt/alt/php-fpm74/usr/etc/php-fpm.d/users/yourdomain.conf

The PHP documentation indicates
QuoteFPM uses php.ini syntax for its configuration file - php-fpm.conf, and pool configuration files.

Example #1 Passing environment variables and PHP settings to a pool
php_flag[display_errors] = off
php_admin_value[error_log] = /var/log/fpm-php.www.log
php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 32M