`

nginx+lua实现错误页面转发

 
阅读更多

server {

164         listen       58888;

165         server_name localhost;

166         root   html;

167         location / {

168             index index.html index.htm;

169         }

170         error_page   404 500 502 503 504 =200 /50x.html;

171         location = /50x.html {

172             default_type 'application/json';

173             echo '{"errorCode":40004, "errorMessage":"系统维护中,请稍候..."}';

174         }

175     }

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics