安装完php php-fpm nginx 后访问php出现file not found错误,html就没问题配置文件server 段如下

server {
listen 80;
server_name 192.168.1.11;
root /home/www; location ~ .*\.php$
{
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
}

google一番,file not found错误与root指令配置错误有关,但是这里并没有错误。
后来发现,php-fpm进程user 是apache,nginx work进程user是www。不一致导致的把php-fpm的启动user改成www,就好了