With some help I constructed (partly borrowed) some nice (so I think) errorpages.
In the www root-directory there's now a file named .htaccess containing:
ErrorDocument 401 /error/401/index.htm
ErrorDocument 403 /error/403/index.htm
ErrorDocument 404 /error/404/index.php
ErrorDocument 500 /error/500/index.htm

This redirects errors to my own pages, for example for a 404 error the document /error/404/index.php. A lot of examples of custom pages are te be found here.