Skip to content

Instantly share code, notes, and snippets.

Avatar

DomHudson

View GitHub Profile
@weapp
weapp / nginx.conf
Created Aug 4, 2014
Return common errors as json in Nginx
View nginx.conf
error_page 500 /500.html;
location /500.html{
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}';
}
error_page 502 /502.html;
location /502.html{
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}';
}