Installed in the local virtual machine, and installed the LNMP environment, the installation is normal, boot is normal, but found the configuration number Nginx, open the PHP page prompt file not found, but access to the HTML page does not affect .
On the internet to find all kinds of information, said let the
Fastcgi_param script_filename /script$fastcgi_script_nam
Modified to:
Fastcgi_param script_filename $document _root$fastcgi_script_nam
But my nginx configuration has been changed to $document _root, so this method is not suitable for my problem.
This solution is everywhere on the web, and I finally found another solution when I had to give up a few degrees.
The scheme says:selinux Authority problem is caused!
PHP-FPM when accessing the index.php file under the Web directory, it was blocked by SELinux, and access was prevented, so there was a case where the file not found was first said.
can be in the WWW directory with ls-z View permissions, there are two options on the net, one is to turn off SELinux directly, the other is to change permissions, because I use the virtual machine, there is no security issues, so take a straightforward simple rough off the selinux solution.
Two ways to turn off selinux
The first type, temporarily closed, does not require a restart, restart will open
0
The second is to shut down from the configuration and need to restart
Vim/etc/sysconfig/selinux
Set the disabled to OK.
Solution Source Address: http://blog.csdn.net/u012511616/article/details/52735539
Linux PHP page open report 404 File not Found