No, you need to set this at the Apache level.
And make sure it's a flat HTML page - if PHP is causing an error and you are trying to provide a page with a 500-page PHP code, you can get this error again, and Apache will find out that your error page is repeating and displays it anyway.
Example from a .htaccess file
ErrorDocument 500 /errors/500.htm
source
share