nginx502错误 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory)


访问html,txt文件正常,但是访问php文件报502;

nginx日志报错

 

 其中,我的是enable-php.conf文件

      location ~ [^/]\.php(/|$)
        {
            try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
        }

改为

        location ~ [^/]\.php(/|$)
        {
            try_files $uri =404;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi.conf;
        }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM