nginx 配置 php遇到的坑

在本地机器上搭建时没有问题,将nginx配置复制到另外一台主机上后一直出问题。


1.nginx 报错

*13776 connect() failed (111: Connection refused) while connecting to upstream, client: 122.114.199.248

此时检查阿里云配置和防火墙均正常

此时用telnet发现也连接不通。

查看端口监听情况

ss -nat

LISTEN     0      128                                                                                                 127.0.0.1:9000 

php-fpm只监听了127.0.0.1


参考https://www.cnblogs.com/jonsea/p/5522018.html上配置php-fpm,重启后正常。

猜你喜欢

转载自blog.csdn.net/w18637468680/article/details/80065997
今日推荐