nginx file not found 错误处理小记

安装完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

相关文章
相关标签/搜索