➜ sudo cp /private/etc/php-fpm.conf.default /private/etc/php-fpm.conf
此时执行
➜ sudo php-fpm
会报错如下:
ERROR: failed to open error_log (/usr/var/log/php-fpm.log): No such file or directory (2)
修改一下/private/etc/php-fpm.conf配置文件的日志目录
➜ sudo nano /private/etc/php-fpm.conf
; Error log file ; If it's set to "syslog", log is sent to syslogd instead of being written ; in a local file. ; Note: the default prefix is /usr/var ; Default Value: log/php-fpm.log ;error_log = log/php-fpm.log #增加这句 error_log = /usr/local/var/log/php-fmp.log
➜ sudo php-fpm #启动! ➜ sudo pkill -INT -o php-fpm #停止
写一个php文件测试下,OK了
nginx配置见:https://dllhook.com/post/192.html
发表评论