問題:
通過Nginx解析PHP報錯,提示File Not Found.
解決思路:
查看錯誤日志:
[root@LNMP ~]# tail /usr/local/nginx/logs/error.log
(推薦教程:centos使用教程)
解決方法如下:
在Nginx配置文件中找到定義調(diào)用腳本文件的地方
將代碼:
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
修改成:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
最后重啟Nginx即可。
相關(guān)視頻教程推薦:linux視頻教程