Yes, it is possible, you need to make the following changes into the server's apache configuration file. Please follow this procedure
1) Edit the apache configuration file : vi /usr/local/apache/conf/httpd.conf
2) Search for "ErrorDocument 404 /404.shtml"
3) Change the last part [/404.shtml] to whatever page you want the 404 to be set to for example:
"ErrorDocument 404 http://yourdomain.com/custom404.html"
"ErrorDocument 404 /home/Customdir/404.html"
4) Save the file & exit.
5) Restart the apache service in the server [/etc/init.d/httpd restart]