当Nginx的nginx.conf配置不合理的时候可能出现当404页面提示:File not found. 的错误
nginx错误日志:
0 1 |
[root@Byrd logs]# cat error.log 2014/07/23 09:10:26 [error] 6166#0: *3 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 218.96.7.75, server: note.t4x.org, request: "GET /admin/index.php?archive=management&action=tab&loadfun=articlelist&menuname_title=AE%B9%E5%88%97%E8%A1%A8&menuid=1&mid=3 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "note.t4x.org |
解决方法:
0 1 2 3 4 5 6 7 8 |
location ~ \.php { root /web/site; try_files $uri =404; #返回404 fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi.conf; } } |
申明:本文由BYRD原创(基于Nginx1.7.1),未经许可禁止转载! SourceByrd's Weblog-https://note.t4x.org/error/nginx-file-not-found/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!