nginx + php fpm -> 404 php pages - file not found

fastcgi_intercept_errors on

it solved the problem


location ~ \.php {
    ..
    try_files $uri =404;
    ..
}

Add this in php location block to tell nginx to check file exist before sending any request to FastCGI.