安装完php php-fpm nginx 后访问php出现file not found错误,html就没问题配置文件server 段以下 php
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指令配置错误有关,可是这里并无错误。 html
后来发现,php-fpm进程user 是apache,nginx work进程user是www。不一致致使的把php-fpm的启动user改为www,就行了 nginx