Default Error Pages?

Yes they can.
Code:
cd /usr/local/directadmin/data/templates/custom
cp -Rp ../default .
cd default
mkdir error
mv *.shtml error
Which will now create the new folder for all new Resellers in /home/reseller/domains/default/error/*.shtml

Now.. for any *existing* Reseller and/or Admins, you'll need to fix them, eg:
Code:
cd /home/[b]reseller[/b]/domains/default
mkdir error
mv *.shtml error
and.. again for all users who need this particular setup, from their public_html to public_html/error.

Lastly, you'll need to tell apache that their location has changed.
Edit your main /etc/httpd/conf/httpd.conf file. Find the code:
Code:
ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
and change it to
Code:
ErrorDocument 400 /error/400.shtml
ErrorDocument 401 /error/401.shtml
ErrorDocument 403 /error/403.shtml
ErrorDocument 404 /error/404.shtml
ErrorDocument 500 /error/500.shtml
John
 
Thank you.. Much appreciated..

Just wondering if you can include this in your next update as I think it would maintain a clean directory sructure for users and eliminate the need of loose files laying aorund in the root.. :)

Cheeers
 
John..

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

AFAIK, Apache expects to see the error files in the root(public_html) folder...so if you were to move them you'd most likely have to change the httpd.conf, which would involve the dreaded shell commands.
 
AFAIK, Apache expects to see the error files in the root(public_html) folder...so if you were to move them you'd most likely have to change the httpd.conf, which would involve the dreaded shell commands.

Are you saying that the code that John posted is not sufficient enough to make the changes I'm looking for?

Cheers
 
Are you saying that the code that John posted is not sufficient enough to make the changes I'm looking for?

Cheers

No....John posted a way for you to have the error pages in /error ... which then meant that you would have to change httpd.conf and some other things using the shell.

Based on your ongoing complaints about the shell(whichy you label as ssh), I was simply trying to tell you that if you moved the error pages you would have to do some stuff in the shell.

You'll also notice that John gave you several commands that would have to be initiated in order to make all of it work.

My question is...is all that work worth it simply to NOT have the error pages in the public_html?

Finally...I hope that John does NOT take up your suggestion to move the error pages to a new location. If he does, then those of us with existing reseller accounts may have to make changes, and then we would be faced with part of the accounts having the error pages in public_html and part in public_html/error
 
Also, if you move the error pages, then the Custom Error Pages function in DirectAdmin would not edit those error pages, since DA looks for them to be in the public_html directory.
 
Also, if you move the error pages, then the Custom Error Pages function in DirectAdmin would not edit those error pages, since DA looks for them to be in the public_html directory.

Jeremy.. Where can you find this feature in the admin panel?

Custom Error Pages function in DirectAdmin

Cheers...
 
Log in, click the User access level link to show the user panel then click a domain if you have too, then under advanced features you should see "Custom Error Pages".

Grant
 
Log in, click the User access level link to show the user panel then click a domain if you have too, then under advanced features you should see "Custom Error Pages".

Grant

Thanks Grant.. Right under my nose.. doh

Just goes to show ya how much weight I place on the look of an error page.. :p
 
Last edited:
John...

I followed your proceedure step by step and the /error folder is being created for all users in the two reseller accounts that I have set up, BUT, the error folder isn't being populated (with the .shtml files), for the users in one reseller account .

How do I "make this happen" for the one re-seller?
 
For Resellers creating Users, the data is taken from:
/home/reselelr/domains/default/*

So you'd be looking for:
/home/reselelr/domains/default/error/404.shtml
etc..

where reseller is the name of the account that is creating the User account. Eg, "admin" would be one such account. (anyone that can create Users)

John
 
Maybe I didn't make myslef clear enough...

OK.. The code as you previously outlined worked fine for reseller# 2

How do I do the same for reseller# 1 when the only folder that is being created is the "error" folder for all the resellers user accounts..

The error folder is getting populated just fine for all th eusers that reseller# 2 has in his accounts but not for reseller# 1.. The error folders stay empty for his new users.
 
Back
Top