1. Create your custom error page. This could be for 500 error (internal server error), 404 error (page not found), 403 error (forbidden), 401 error (authorization required), 400 error (bad request).
2. Login to DirectAdmin server control panel.
3. Locate link Custom Error Pages.
4. Choose any file to edit for certain error page.
5. Paste your web page source code to the editor and click Save As.
The same steps valid for every error code. Alternatively you can select error page for each directory by creating .htaccess file in each directory (if there is no .htaccess file).
Copy this line to the end of your .htaccess file:
ErrorDocument 401 http://yourdomain.com/nopassword.html
This code should be for each error you want to set the custom page. Reemember use the correct editor to edit .htaccess (e.g. Notepad ++).