作者/来源:yixinu.com
栏目:运维/编程
日期:2014-04-12 07:58:53
为了避免nginx 全用fastcgi 执行perl 暴露perl 错误码,所以需要人为设置,nginx 代理perl的404错误。。
perl 开发web时,如果需要设置404页面错误,需要输出一行代码:
print "Status: 404 Bad Request", "
";
这一行代码将改变 HTTP Status code 为404。
设置好perl之后,再设置nginx
使用 fastcgi_intercept_errors on; 配置
指定 error_page 404 /404.html
这样设置就OK 了