nginx+lua implements error page forwarding

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":"System maintenance, please wait..."}';

174         }

175     }

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326343954&siteId=291194637