upsforum

Well-Known Member
Jul 27, 2005
474
0
166
I set a 404 global page in WHM -> Apache Configuration -> Include Editor with these rows in

Code:
Alias /errorfolder /usr/local/apache/errorfolder
ErrorDocument 404 /errorfolder/404.shtml
but not possible that if user account set its 404 custom page, is priority on my global 404 page?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

Could you provide more information on the exact entries you are using so we can attempt to reproduce this behavior? For example, which include file are you using in "WHM Home » Service Configuration » Apache Configuration » Include Editor"? Also, which custom directories/files have you already created? What methods are the accounts using to enable their own custom 404 error pages?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
I browsed to the following option on a test server:

"WHM Home » Service Configuration » Apache Configuration » Include Editor"

I added the following value to "Pre VirtualHost Include":

Code:
Alias /errorfolder /usr/local/apache/htdocs
ErrorDocument 404 /errorfolder/404.shtml
I then edited "/usr/local/apache/htdocs/404.shtml" with some custom entries. Upon testing, even after creating a custom 404.shtml error page within an account, the global custom error page was still applied. Do you have any custom entries in the .htaccess file within the account?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
I also done this adding rows in pre virtual host include..but no use...please give a valuable path..
Could you open a ticket so we can check why the method I provided to you is not working on your server?

Submit A Ticket

Please post the ticket number here so we can keep this thread updated.

Thank you.
 

upsforum

Well-Known Member
Jul 27, 2005
474
0
166
the solution is that every user must add rule in htaccess root:

ErrorDocument 404 /404.shtml

this why add 404.shtml file in user web root is not sufficient for exlude 404 in "Pre VirtualHost Include"
 

robb3369

Well-Known Member
Mar 1, 2008
122
1
68
cPanel Access Level
Root Administrator
You can use the skel directory to setup the defaults for new accounts...

Add your default error pages, images and .htaccess files to the /root/cpanel3-skel/public_html... They will be copied to the new account upon creation...