custom error page for whole site.

infiltrator

Verified User
Joined
Jun 8, 2006
Messages
41
Hi,
I cant find how i can set the config file of apache so , that its loads custom made error pages for the whole server incl. all domains / users installed on it.

i changed the default http.conf into this:

ErrorDocument 400 /home/admin/domains/foxco.be/public_html/400.shtml
ErrorDocument 401 /home/admin/domains/foxco.be/public_html/401.shtml
ErrorDocument 403 /home/admin/domains/foxco.be/public_html/403.shtml
ErrorDocument 404 /home/admin/domains/foxco.be/public_html/404.shtml
ErrorDocument 500 /home/admin/domains/foxco.be/public_html/500.shtml

I found out that if a change the directory in the config file, it also ads the domain root dir in the end form the domain thats generating the error

--> if i surf to www.foxcom.be/dogy i must get a error 440

and my eror log shows this :

/home/admin/domains/foxco.be/public_html/home/admin/domains/foxco.be/public_html/404.shtml

When i surf to www.fake.be/fake

i problebly get
/home/admin/domains/fake.be/public_html/home/admin/domains/foxco.be/public_html/404.shtml

How can i set the config file pointing at the correct custom error page and have it for the whole server?So it uses the same custom made error page for every domain thats on that server?
 

infiltrator

Verified User
Joined
Jun 8, 2006
Messages
41
Solved

This link from appache self explains the whole thing step by step including how to use them as international error pages...

http://httpd.apache.org/docs/1.3/misc/custom_errordocs.html

I commented the standard errorpage setting , and started changing thins below ...
#Start DirectAdmin Settings
in the httpd.conf file

## Begin errordoc mod didier
Alias /errordocs /etc/httpd/errordocs
<Directory /etc/httpd/errordocs>
AllowOverride none
Options MultiViews IncludesNoExec FollowSymLinks
AddType text/html .shtml
AddHandler server-parsed .shtml
</Directory>
# "400 Bad Request",
ErrorDocument 400 /errordocs/400
# "401 Authorization Required",
ErrorDocument 401 /errordocs/401
# "403 Forbidden",
ErrorDocument 403 /errordocs/403
# "404 Not Found",
ErrorDocument 404 /errordocs/404
# "500 Internal Server Error",
ErrorDocument 500 /errordocs/500

also creating a new directory with the proper dir and file rights explained on that url and putted the eroorfiles in there
/etc/httpd/errordocs
aka 401.shtml.en and so on
Hope this helps out everyone looking for this...

The link to the appache site is very difficult to find, you have to go through different links that has noting to do with the problem before you find the explanation you need...
 

ozgurerdogan

Verified User
Joined
Apr 20, 2008
Messages
299
I know this is an old thread but after doing those, users can not set their own error pages even I tried AllowOverride All.

What can the issue be?
Thanks
 

infiltrator

Verified User
Joined
Jun 8, 2006
Messages
41
update...

Put the changes in /etc/httpd/conf/extra/httpd-includes.conf

so the changes dont get overwriten, when directadmin updates the httpd.conf file.
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
There some setting already in directadmin for error pages.
 
Top