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.

global 404 page and priority

Discussion in 'General Discussion' started by upsforum, May 25, 2013.

  1. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    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?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,696
    Likes Received:
    656
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    I added rows in "Pre VirtualHost Include", I tried also in "Pre Main Include" but not work.
     
  4. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    I tried with an account user with html editor in cpanel section error pages
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,696
    Likes Received:
    656
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  6. AryanWans

    AryanWans Registered

    Joined:
    Jun 3, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I also done this adding rows in pre virtual host include..but no use...please give a valuable path..
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,696
    Likes Received:
    656
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  8. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    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"
     
  9. robb3369

    robb3369 Well-Known Member

    Joined:
    Mar 1, 2008
    Messages:
    122
    Likes Received:
    0
    Trophy Points:
    16
    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...
     
Loading...

Share This Page