Lnmp,php-fpm modifies the specified php.ini path

how to permanently modify php-fpm to specify the loaded php.ini path,

I use
/ usr/local/php/sbin/php-fpm-y / usr/local/php/etc/php-fpm.conf-c / usr/local/php/etc/php.ini

after restarting systemctl restart php-fpm.service, the Loaded Configuration File path changes again

Jun.05,2022

only specify php.ini when compiling php


  1. when you start php-fpm, you specify the php.ini file with the-c parameter, which is sure to be successful this time;
  2. after restart, it must have recovered again, whether through service, / etc/init.d/, systemctl, etc.;
  3. because it has been specified by default when compiling, note that it is default, so every quick restart must be a loaded default configuration file. As for where that default file is, you can see the output at compile time
  4. .
Menu