The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Eliminating 404.shtml errors

Discussion in 'General Discussion' started by lbeachmike, Feb 1, 2012.

  1. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    There is a script floating around out there for adding a 404.shtml page to every site where they are not present so that log files are not getting jammed up with these.

    Here is one such place to find this script -

    add a 404 page to each website on a cpanel server

    QUESTION -

    Since I would have to set this up to run regularly on servers and/or run automatically for new accounts, is it a perfectly acceptable option to simply modify the error handling in the httpd.conf file (more specifically, /usr/local/apache/conf/includes/errordocument.conf) ??

    This way, I am thinking that everything could be sent to a central 404 page for the server.

    Any thoughts on this?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I place all error pages and a favicon and a few other items into the cpanel3-skel/public_html/ so that on account creation these files are added to the new account.
     
  3. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    That's great - I did not realize that populating that template would get it added to new accounts. Perfect.

    Are you aware of any sites that may have open-source error pages/templates ready-for-use?
     
  4. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    There are many sites that provides these templates but you need to search in google with the relevant keywords for this.
     
  5. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Yes - more generic search terms don't work well to find this. I was simply wondering if somebody was already aware of something worth noting.

    I wasn't excited by the results of my searches thus far.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Worth noting is the error page editor, built into your cPanel. :)

    cPanel > Advanced block, Error pages.

    With that handy tool in mind, some ideas.
    /http://blogof.francescomugnai.com/2009/02/70-more-fantastic-404-error-pages/

    Hint: I use the same error page for all error pages, just edited for each error code.

    HTH! :)
     
  7. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Thanks very much - it looks like you and I found exactly the same blog : )

    mrk
     
Loading...

Share This Page