Yes, you can easily customize the error pages for the error 404 (page not found) and 401 (access denied).

You have to create the pages that you want to show to your web site's users and call them "not_found.html" for the error 404 and "access_denied.html" for the error 401. These pages have to be placed in the root of your web space.

You can also use php scripts called respectively "not_found.php" and "access_denied.php". You can use the variables $_GET['missing_document'] and $_GET['missing_host'] to detect the page and the domain asked by the user.

If you want to do more, customizing also the other error pages, you can use the directive ErrorDocument as described here (