Custom Bad Gateway Pages.
npm install -S @jswork/bad-gateway-pages
#site-wide error pages
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
set $bad_gataway_pages "/YOUR_PATH/node_modules/@jswork/bad-gataway-pages/dist";
error_page 404 /404.html;
location = /404.html {
root $bad_gataway_pages;
internal;
}
error_page 410 /410.html;
location = /410.html {
root $bad_gataway_pages;
internal;
}
error_page 500 502 503 504 /502.html;
location = /502.html {
root $bad_gataway_pages;
internal;
}
}
- https://stackoverflow.com/questions/7796237/custom-bad-gateway-page-with-nginx
- https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-to-use-custom-error-pages-on-ubuntu-14-04
Code released under the MIT license.