Nginx error pages

nano /etc/nginx/error-pages.conf

error_page 403 404 /40x.html;  
location = /40x.html {  
    root /var/www/html;
}

error_page 500 502 503 504 /50x.html;  
location = /50x.html {  
    root /var/www/html;
}