nginx禁用api接口,并提示

提示json的输出

location / {
            default_type application/json;
            return 200 '{"code":1001,"message":"服务器升级中","data":""}';
        }

提示文本的输出

location / {
            default_type text/html;
            return 200 '哈哈哈哈';
        }
你好
原文地址:https://www.cnblogs.com/cuibaiyi/p/9140077.html