php-fpm错误:No pool defined. at least one pool section

运行环境:MacOS 10.13.6
启动 php-fpm 时报错内容:

[18-Aug-2018 22:43:11] ERROR: No pool defined. at least one pool section must be specified in config file
[18-Aug-2018 22:43:11] ERROR: failed to post process the configuration
[18-Aug-2018 22:43:11] ERROR: FPM initialization failed

php-fpm配置文件内容(有效配置就三行):

[global]
error_log = /usr/local/var/log/php-fpm.log
pid = /usr/local/var/run/php-fpm.pid

配置文件所在目录:/private/etc/php-fpm.conf
运行命令:sudo php-fpm

补充:自己了解大概是要配置 'pool' ,上网可劲搜,但就是解决不了这个问题,只好来求助~谢谢

阅读 8.2k
1 个回答

仔细查看一下你的php-fpm.conf文件

;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;

; Multiple pools of child processes may be started with different listening
; ports and different management options.  The name of the pool will be
; used in logs and stats. There is no limitation on the number of pools which
; FPM can handle. Your system will tell you anyway :)

; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
; Relative path can also be used. They will be prefixed by:
;  - the global prefix if it's been set (-p argument)
;  - /app/php/7.2.7 otherwise
include=/app/php/7.2.7/etc/php-fpm.d/*.conf

注意上面最后一行,去你的对应的文件夹下面将默认的www.conf.default重命名为www.conf。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题