Configure Nginx global error page

According to nginx documentation error_page directive is allowed in following locations: http, server, location, if in location.