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