Disable DA 'ErrorDocument' ?

Extrarius

Verified User
Joined
Nov 7, 2005
Messages
8
Ok, by default, DirectAdmin sets up several ErrorDocument redirects to 404.shtml for error 404 and likewise for a few others.

Unfortunately, I don't want custom error pages - I want the default apache messages.

After looking around quite a bit, I cant figure out how to override the ErrorMessage directive without supplying a new document/message which I don't want to do.

Is it possible to tell apache to just use the default messages through an htaccess file ?
 
You've posted this under User-Level Difficulties but you can only manage this if your the system administrator.

While theoretically you can have a lot of control, the way DA is organized and the way httpd.conf is written, you can only easily do this per server.

But if you have server administration rights, you can change DA server wide, by changing /etc/httpd/conf/httpd.conf to comment out these lines:
Code:
ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
and restarting apache.

Otherwise you can create your own error documents that look exactly as apache default documents; for example, the one for a 404 error would look something like this:
Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /nonexistent.html was not found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.33 Server at www.example.com Port 80</ADDRESS>
</BODY></HTML>
Since of course you don't want to make the effort of creating this for each user you'd have to use a server name instead of a domain name.

Jeff
 
Back
Top