Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Can you make a custom 503 error page server wide?

Discussion in 'CloudLinux' started by WebHostPro, Feb 12, 2018.

  1. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,651
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,834
    Likes Received:
    85
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,651
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hmm, I couldn't find a way on there. Thanks though.

    If I added a 503 error page in the users public_html folder will that load? 503.shtml for example?

    Ideally I would just edit the server page for that error but added the file is a good work around.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,834
    Likes Received:
    85
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    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
    ---------- ----------
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,651
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice