nginx file not found 錯誤處理小記


安裝完php php-fpm nginx 后訪問php出現file not found錯誤,html就沒問題配置文件server 段如下

server {
        listen       80; 
        server_name  192.168.1.11;
        root  /home/www;


        location ~ .*\.php$
        {   
            try_files $uri =404;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include fcgi.conf;
        }   
 }   

google一番,file not found錯誤與root指令配置錯誤有關,但是這里並沒有錯誤。

后來發現,php-fpm進程user 是apache,nginx work進程user是www。不一致導致的把php-fpm的啟動user改成www,就好了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM