Problem:
An error is reported when parsing PHP through Nginx, prompting File Not Found.
Solution:
View the error log:
[root@LNMP ~]# tail /usr/local/nginx/logs/error.log
(Recommended tutorial: centos usage tutorial)
The solution is as follows:
In the Nginx configuration file Find the place where the calling script file is defined
and change the code:
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
to:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
Finally restart Nginx.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of nginx cannot parse php under centos system. For more information, please follow other related articles on the PHP Chinese website!