Skip to content

Instantly share code, notes, and snippets.

@keinwort
keinwort / nginx.conf
Last active September 18, 2017 14:44 — forked from weapp/nginx.conf
Return common errors as json in Nginx #nginx #error
### possible include this
# include /put_path_here/nginx_errors.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{