nginx 错误页面

原创
2016/09/09 18:24
阅读数 111
error_page 400 404 405 =200 @40*_json;
    location @40*_json {
        default_type application/json;
        return 200 '{"errcode":"404", "errmsg": "Hi guy,the API you are visiting does not exist, please check the URL and parameters."}';
    }
        error_page 500 502 503 504 =200 @50*_json;
        location @50*_json {
                default_type application/json;
                return 200 '{"errcode":"1", "errmsg": "Server internal error, please contact the developer"}';
        }
error_page   500 502 503 504  /50x.html;
       location = /50x.html {
               root   html/;
       }
展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
1 收藏
0
分享
返回顶部
顶部