Can you make a custom 503 error page server wide?

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,723
27
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
Hi,

I was thinking a nicer friendlier looking 503 error page with some tips might be helpful for our customers.

Can I make a 503 error page this will be used on all accounts?

Maybe in the default public_html folders on the root partition? Those folders that add stuff when new accounts are created.

Or maybe in Apache somewhere?
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

You can add something like below in the .htaccess file of the user account inside public_html and then create the respective 503 file.
---------- ----------
ErrorDocument 503 /503.shtml
---------- ----------
 

WebHostPro

Well-Known Member
PartnerNOC
Jul 28, 2002
1,723
27
328
LA, Costa RIca
cPanel Access Level
Root Administrator
Twitter
Good idea, this means I'll have to have custom htaccess file that will be added to new accounts from the default folder section in the root of the server.

You don't think this will cause any issues. Just thinking the server or cPanel might not be happy about not being able to add a their htaccess file with the new account.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

You could manually edit error pages such as /var/www/html/404.shtml if you wanted a custom default 404 error page. Or, simply create custom error pages (e.g. 404.shtml) in the document roots of the websites (e.g. /home/user/public_html). Custom .htaccess entries are not required when uploading the custom error pages to the document roots.

Thank you.