Set php-fpm default configuration file location

后端 未结 3 1225
礼貌的吻别
礼貌的吻别 2021-01-13 14:55

I\'ve built from source php + php-fpm + nginx few times.

I\'m used to keep everything inside /usr/local

Hovewer php-fpm config file php-fp

相关标签:
3条回答
  • 2021-01-13 15:22

    Performing a multi-file search on PHP's sources and build files reveals that

    php-fpm.conf location is determined by the compile-time option

    --sysconfdir=/path/to
    

    specified when invoking ./configure

    0 讨论(0)
  • 2021-01-13 15:23
    • You can compile php with the --with-config-file-path=PATH compile-time option.

      For your reference PHP Compile-Time Options

    • You can use a custom php.ini file using a .htaccess with Apache adding le line

      SetEnv PHPRC /location/todir/containing/phpinifile

    • To specify a custom php.ini with NginX check this link

    • As you pointed out you can use a CLI directive to choose a different php.ini as well

    0 讨论(0)
  • 2021-01-13 15:37

    actually the real reason is you used the old TARed php source code,
    you should RM the old TARed php source one and re-Tar xvf php-version.tar.gz,
    lastly, configure it and so on. you can try it if you don't believe it~

    :p

    0 讨论(0)
提交回复
热议问题