error_page 404 /404.html;
error_page 502 /502.html;
location = /404.html {
root /etc/nginx/error-pages/404;
proxy_intercept_errors on;
internal;
}
location = /502.html {
root /etc/nginx/error-pages/502;