Nginx/FPM/PHP all php files say 'File not found.'
Posted
by
Boon
on Server Fault
See other posts from Server Fault
or by Boon
Published on 2012-03-11T10:53:16Z
Indexed on
2012/03/23
11:31 UTC
Read the original article
Hit count: 308
i just installed nginx 1.1.13 and php 5.4.0 on a centos 5.8 final 64bit machine. Nginx and PHP/Fpm are running, and I can run php scripts via ssh command line, but in the browser I keep getting 'File not found.' errors on all my PHP files.
This is how I have my nginx.conf handle PHP scripts:
location ~ \.php$
{
root /opt/nginx/html;
fastcgi_pass unix:/tmp/fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /opt/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
This is a direct copy/paste from my other servers, where it works fine with this setup (but they run older versions of php/fpm).
Why am I getting those errors?
© Server Fault or respective owner