标签:pass direct src 文件 span director highlight ash use
若fpm配置文件中配置如下:
listen = 127.0.0.1:9000
则对应的nginx.conf中的配置应为:
fastcgi_pass 127.0.0.1:9000;
此时开启9000端口监听,不会生成sock文件
若fpm中的配置为使用Unix套接字,如下:
listen = /run/php/php7.2-fpm.sock
则对应nginx.conf中的配置应为:
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
此时9000端口未开启,在/run/php/下生成php7.2-fpm.sock文件:
若两者不匹配则nginx启动失败。
若fpm为sock,nginx为127.0.0.1:9000,则会出现以下错误:
connect() failed (111: Connection refused) while connecting to upstream
若fpm未127.0.0.1:9000,nginx为sock,则会出现以下错误:
connect() to unix:/run/php/php7.2-fpm.sock failed (2: No such file or directory) while connecting to upstream
标签:pass direct src 文件 span director highlight ash use
原文地址:https://www.cnblogs.com/adhzl/p/11808922.html