php-fpm开启报错-ERROR: An another FPM instance seems to already listen on /tmp/php-cgi.sock
生活随笔
收集整理的這篇文章主要介紹了
php-fpm开启报错-ERROR: An another FPM instance seems to already listen on /tmp/php-cgi.sock
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
在升級(jí)了php7.2.0版本之后,重新啟動(dòng)php-fpm過程中遇到一個(gè)報(bào)錯(cuò)。
An another FPM instance seems to already listen on /tmp/php-cgi.sock
# netstat -ant | grep 9000 //查看啟動(dòng)進(jìn)程,發(fā)現(xiàn)沒啟動(dòng)成功
我們?nèi)ゲ榭匆幌聀hp-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
?
此時(shí)我們需要根據(jù)配置文件的listen地址做對(duì)應(yīng)的修改:
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,然后啟動(dòng)php-fpm,OK
總結(jié)
以上是生活随笔為你收集整理的php-fpm开启报错-ERROR: An another FPM instance seems to already listen on /tmp/php-cgi.sock的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CentOS7下启动Nginx出现Fai
- 下一篇: Python的WeRoBot框架开发公众