There may be many reasons for this, but for beginners. Most should be/etc/nginx/conf.d/default.conf inside the PHP parsing part of the configuration is incorrect.
The solution is to define the root and add it under server so that the scope of root is expanded. Remove the root from the location ~ \.php${. Fastcgi_param section changed to $document_root$fastcgi_script_name;
Well, let's summarize the reasons for this kind of error:
1. One of the possible reasons: the/etc/nginx/conf.d/default.conf root path and the PHP parsing section are not configured.
Workaround: Place the root definition under Server, or the root definition in the PHP parsing section as the full path. At the same time, the Fastcgi_param part is changed to $document_root$fastcgi_script_name;
2. Two possible reasons: the requested file (for example: xxx.php) file does not really exist the path corresponding to the URL.
Resolution: Locate the relevant file and confirm the path.
3. Three possible reasons: the path does not have read permissions.
FIX: Add users and Permissions.
4. Off-topic, if no PHP parsing is turned on. Then the PHP file is downloaded as a file and is not parsed.
Reference links and articles are as follows:
Http://www.2cto.com/os/201212/178528.html
Http://www.cnblogs.com/iosdev/p/3439834.html
Http://blog.chinaunix.net/uid-26719405-id-3586780.html
Http://www.trackself.com/archives/2443.html
Nginx report File not found error