Home >Backend Development >PHP Tutorial >nginx服务器上访问不存在的php页面No input file specified
nginx服务器下访问不存在的php页面No input file specified.
在nginx/conf/nginx.conf 找到:
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 改为:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
http://apps.hi.baidu.com/share/detail/31677987
http://www.oschina.net/question/57933_27069
nginx服务器下访问不存在的非php页面,可以正常出现自定义的404提示页,但是访问不存在的php页面,页面信息显示
初步估计是fastcgi没把错误给Nginx
查了下nginx的文档 果然
fastcgi_intercept_errorssyntax: fastcgi_intercept_errors on|offdefault: fastcgi_intercept_errors offcontext: http, server, location 默认的是off
fastcgi_intercept_errors on;