nginx: file not found

I have nginx + php but got message «File not found»,
this is a part of my config where i set proxy for php-fpm:

    location ~ .php$ {
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /var/www/test$fastcgi_script_name;
        include fastcgi_params;
    }

Fix is simple as a piece of cake:

    location ~ .php$ {
        root /var/www/test;
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /var/www/test$fastcgi_script_name;
        include fastcgi_params;
    }