nginx如何配置网页错误页面

首先要在http模块中加入

fastcgi_intercept_errors on;

其次要在server模块中加入

error_page 403 404 /40x.html;
    location = /40x.html {
}

  我们只要把写好的错误页面40x.html放到根目录下就行了

posted @ 2016-11-14 13:51  枫叶那个飘啊  阅读(171)  评论(0编辑  收藏  举报