php-fpm开启报错-ERROR: An another FPM instance seems..
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php-fpm开启报错-ERROR: An another FPM instance seems..相关的知识,希望对你有一定的参考价值。
在部署项目的时候遇到了 An another FPM instance seems to already listen on /tmp/php-cgi.sock解决方法:
netstat -ant | grep 9000 //查看启动进程,发现没启动成功
查看php-fpm.conf里面的配置:
vim /usr/local/php/etc/php-fpm.conf
[www]
listen = /tmp/php-cgi.sock //注意这里,要与下面的一致
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
此时根据配置文件的listen地址做对应的修改:
vim /usr/local/nginx/conf/nginx.conf
location ~ [^/].php(/|$) {
fastcgi_pass unix:/tmp/php-cgi.sock; //把127.0.0.1:9000改为此行
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
root html;
index index.php index.html index.htm;
}
修改完后重启nginx,然后启动php-fpm就恢复正常了.
以上是关于php-fpm开启报错-ERROR: An another FPM instance seems..的主要内容,如果未能解决你的问题,请参考以下文章
docker An error occurred 虚拟化错误解决
mysql:Error 3948 (42000): Loading local data is disabled; this must be enabled on both the client an
mac 启动php-fpm报错 failed to open configuration file '/private/etc/php-fpm.conf': No such file
MySQL技术专题(3)MySQL报错Got an error reading communication packets问题分析指南