Default Error Pages?

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Whenever I type the name of an html page that doesn't exist I get a default error message that says, in part:

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Aren't there default error pages?

If there are, how do I enable them?

Thanks.

Jeff
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Phil, the line is too long so it doesn't show, and my browser errors out without copying in the URL so I can't turn it into a real one to look.

Do you, does anyone, know where the default error pages are on the server.

Default, as in "already there when the site is created"????

The 512 k limitation is an ie limitation, and I'm testing with Konqueror, Mozilla, and Netscape. None of which care; the error pages can be of any length and will still show up.

The error we're getting is coming from Apache, which is telling us it can't find a default error page.

Jeff
 

l0rdphi1

Verified User
Joined
Jun 22, 2003
Messages
1,471
Yeah, I see. You're asking where DA tells apache to use them, and that I do not know.

And by the way, that URL is:
Code:
http://domain.tld:2222/HTM_ERROR_PAGES?DOMAIN=domain.tld
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Thanks, Phil.

When I type that in (and fix it of course :) ), I get a "document contains no pages" error : ( ).

I don't know if there are defaults or not.

So far that's the least of my worries.

It's taken me since last night to move five sites, and ALL of them have failed in one significant manner or another.

And it looks like Mark and John are out of touch this weekend :( .

I already lost one client, and I just got off the phone sweet-talking another.

The problem is I have a timed Plesk License, as a gold partner, and I didn't renew the partnership, in expectation of the DA working for me. But I got delayed in implementing it, and had the wrong date for the Plesk license expiration.

So I may have to either renew the Plesk partnership or at least buy a Plesk license, just to stay in business.

I have other Plesk licenses, but there's no way to do a partial Plesk restore (a restore wipes the machine :( ), and I'm not allowed (under license terms) to use the same license on more than one system.

As you may have noticed, in one post I even offered to pay for support today.

Jeff
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
John,

I'm using your default skin.

The error message in question comes from Apache itself when it can't find the error file it's supposed to use.

I'll check this more later, but first I want to move and test some real sites.

If this problem continues, then the best way to track it down would be for you to tell me where you keep the actual default error pages; then I can check through the apache configuration.

Or you could do it as well, if you have the time.

Jeff
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,961
It's up to the User to add error pages. They will be located in their document root. If they don't have them, they'll get an error page, with an additional note about not having an error page. (Possibly similar to the one you have)

The name of the 404 page file should be 404.shtml

John
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Hmmm....

This puts a burden on the site-owner that I've not seen from any other control panel I've used (admittedly, nowhere near all).

The default installation of Apache has it's own error pages, Cobalt RaQs have a default error page, and Plesk has them as well.

Is there some way I could have default error pages? Perhaps put them into the skel directory?

Thanks.

Jeff
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,961
Jeff, there is a "default" directory that is used to copy default files into each domain that is created. (The same one that shows the default "welcome to domain.com, upload your index.html file to public_html").

The location of this folder is under the resellers home directory:

/home/resellername/domains/default

Everything in that directoy is copied to the user's public_html directory when a new domain is created, so if you want default error pages, put them in there. Also, the index.html file will be tokenized.

John
 

gerrybakker

Verified User
Joined
Apr 24, 2004
Messages
49
I know this topic hasn't been touched in almost 4 years but here is a nudge. The default httpd.conf has references to the 401,403,404,500.shtml files and yet they don't exist by default on the server.

So my server logs are stuffed with needless log entries showing the files don't exist. This is so unnecessary and ugly - why hasn't the default pages for this been implemented for all sites without any end user intervention? I agree with jlasman that this puts an unnecessary burden on all end users and it affects their search engine rankings when they get improperly terminated pages.

Shouldn't there be a standard apache set of error pages sitting in the /var/www/html folder so it becomes the default for all sites who don't have their own 404.shtml files in their own public_html folders?

Yes I could put the default shtml files the /home/resellername/domains/default folder but this also puts an unnecessary burden on me when initially configuring a new server. All your competition provides this default set of error pages? Why are you resisting after all these years?
 

bruin03

Verified User
Joined
Dec 4, 2006
Messages
40
I know this topic hasn't been touched in almost 4 years but here is a nudge. The default httpd.conf has references to the 401,403,404,500.shtml files and yet they don't exist by default on the server.

So my server logs are stuffed with needless log entries showing the files don't exist. This is so unnecessary and ugly - why hasn't the default pages for this been implemented for all sites without any end user intervention? I agree with jlasman that this puts an unnecessary burden on all end users and it affects their search engine rankings when they get improperly terminated pages.

Shouldn't there be a standard apache set of error pages sitting in the /var/www/html folder so it becomes the default for all sites who don't have their own 404.shtml files in their own public_html folders?

Yes I could put the default shtml files the /home/resellername/domains/default folder but this also puts an unnecessary burden on me when initially configuring a new server. All your competition provides this default set of error pages? Why are you resisting after all these years?
I found this thread due to finding that domains on my machine don't have error messages by default.
I agree with the previous poster. This puts an uneccessary burden on me when configuring a new server. I do hope that this was initially an oversight and that the Direct Admin Team ultimately listens to their customers and reconsiders. I don't see any benefit to leaving the error messages out by default.
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,961
Hello,

default error messages can be added by default.
For us with releases, they can be put into:

/usr/local/directadmin/data/templates/default/404.shtml

so newly created resellers/admins have them for new accounts they create.

For existing resellers/admins, if you want your new users to have them, put them in:

/home/reseller/domains/default/404.shtml

and they'll get copied to the new account when it's created.

So my only question at the moment is:

1) do you actually want them.
2) what do you want them to look like, if anything at all.
3) do you want the other pages as well, not just 404?

John
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
John, if it were me, I'd like them to look like ordinary default error pages Apache creates if you don't have paths for them in your httpd configuration. And yes, I think they should be available for all of them.

This is good enough for me:
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 /nothere.html was not found on this server.<P>
</BODY></HTML>
This is exactly what I get when I comment out the ErrorDocument lines on a DA server running httpd 1.x, and restart apache.

Personally, I believe cute error messages, similar to the ones the old Cobalt RaQ servers used, look ugly to me, and uses extra resources, and should be left for those who want something customized.

Jeff
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,961
Hello,

I've added 400, 401, 403 and 404 as default in /usr/local/directadmin/data/templates/default/*.shtml.
Will apply to new resellers when they're created and copied to /home/reseller/domains/default/*.shtml along with everything else in the tempates/default directory.

Here is the html used
400
Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request/H1>
There was an error in your request.
<HR>
<I><!--#echo var="HTTP_HOST" --></I>
</BODY></HTML>
401
Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Authorization Required</TITLE>
</HEAD><BODY>
<H1>Authorization Required</H1>
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
<HR>
<I><!--#echo var="HTTP_HOST" --></I>
</BODY></HTML>
403
Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access <!--#echo var="REQUEST_URI" --> on this server.
<HR>
<I><!--#echo var="HTTP_HOST" --></I>
</BODY></HTML>
404
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 <!--#echo var="REQUEST_URI" --> was not found on this server.
<HR>
<I><!--#echo var="HTTP_HOST" --></I>
</BODY></HTML>
John
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Thanks, John. Will this just happen during the next update, for existing domains? For existing servers for new domains?

Jeff
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,961
It will be for next update (it's already coded), and only few newly created Resellers/Admins after the update. Existing Resellers will not have their /home/reseller/domains/default directory updated with this data, so their new Users will not get the new shtml files unless they manually create the shtml files in their own default directory.

John
 

RadMan

Verified User
Joined
Apr 12, 2007
Messages
209
Location
Canada
It will be for next update (it's already coded), and only few newly created Resellers/Admins after the update. Existing Resellers will not have their /home/reseller/domains/default directory updated with this data, so their new Users will not get the new shtml files unless they manually create the shtml files in their own default directory.

John
John..

Is there any way that the error files can be inserted into an /error folder by default when creating a new user?

Reason I'm asking is because I just created a new re-seller last week and set up a couple of users in his account...

All five of the error files are now being displayed loosy goosy in the user's root directory..

If SSH instructions to create a default subfolder for all users are in order, can you please give me a step by step process right after logging in as root..

Floyd.. Don't bother answering.. I can't see you anyways and the question has not been posted to you.

Cheers
 
Last edited:
Top