php 设置php-fpm默认配置文件位置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35668008/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 00:31:38  来源:igfitidea点击:

Set php-fpm default configuration file location

php

提问by Paolo

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

我已经从源 php + php-fpm + nginx 构建了几次。

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

我习惯把一切都藏在里面 /usr/local

Hovewer php-fpm config file php-fpm.confis always loaded from /etc/

然而,php-fpm 配置文件php-fpm.conf总是从/etc/

Of course I can change the location with the -ydirective when php-fpm is started but I'd prefer to have a different location by default.

当然,我可以-y在 php-fpm 启动时使用指令更改位置,但默认情况下我更喜欢使用不同的位置。

Is there any way to do this?

有没有办法做到这一点?

Does the default location depends upon a directive set when running ./configbefore the actual build?

默认位置是否取决于在./config实际构建之前运行时设置的指令?

采纳答案by Paolo

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

对 PHP 的源代码和构建文件执行多文件搜索显示

php-fpm.conflocation is determined by the compile-time option

php-fpm.conf位置由编译时选项决定

--sysconfdir=/path/to

specified when invoking ./configure

调用时指定 ./configure

回答by touchstone

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~

其实真正的原因是你使用了旧的TARed php源代码,
你应该RM旧的TARed php源代码一并重新Tar xvf php-version.tar.gz,
最后,配置它等等。不信可以试试~

:p

:p

回答by Simone Conti