if there are many sites hosted on your server and you want a different message for each site, adding
ErrorDocument 404
to .htaccess file is the way to go.
If you want the same error message to occur across all the websites, then setting ErrorDocument in httpd.conf is the way to go.