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.

HTTP Templates Problem

Discussion in 'General Discussion' started by BrandMan211, May 3, 2007.

  1. BrandMan211

    BrandMan211 Active Member

    Joined:
    Apr 6, 2007
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I run a hosting company. Because we allow free users, we make error pages redirect to our site for free accounts. Because our schedule is somewhat busy and considering we have gotten more users, we do not have the time to add the code to apache every single day. So, we tried editing the HTTP Templates, which seemed to work fine. In case you did not know, the filepath is /usr/local/cpanel/etc/httptemplates/apache1/default. Then, the next day, the new sites did not have the code on. I looked at the file and it was back to normal. I need to make sure this does not happen again. Any suggestions?

    All help is appreciated. Thank you.
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Do you have cPanel set up to do automatic updates?

    If so, you might consider turning off automatic updates, and seeing if the problem persists.

    I believe the templates file is overwritten when a cPanel update occurs.
     
  3. BrandMan211

    BrandMan211 Active Member

    Joined:
    Apr 6, 2007
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Well, does cPanel update every day? Because it's then when it seems to overwrite. We would like to keep the automatic updates, but we don't want this to be overwritten. Is there a way to disallow this file from being overwritten?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I don't believe there's a way to avoid it being overwritten and you should not use the immutable flag in cPanel files. I seem to recall seeing something about cPanel allowing the templates to be configurable, but could be wrong. I'd suggest adding a bugzilla enhancement request for this.
     
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    There is one available at:

    http://bugzilla.cpanel.net/show_bug.cgi?id=3209

    I don't guess it made it into cPanel 11.
     
  6. BrandMan211

    BrandMan211 Active Member

    Joined:
    Apr 6, 2007
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Wouldn't we lose out on the benefits of updates then? And are you sure this is the issue? This is happening every day around midnight.
     
  7. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    cPanel really only updates as seen on http://layer2.cpanel.net under Layer 2 Downloads.

    If you know what build you are on, then if that build has not been updated, then there is no cPanel update.

    For example, I am running the Release build, there hasn't been a change since April 25th, so running a cpanel update after the 25th is really pointless as no new information is downloaded.

    I believe the cPanel updates may do a type of integrity check on some of its internal parts, and the http template might be part of that check. This means that if you run a cPanel update and even if nothing has changed in the internal cPanel code, the integrity check will still "fix" the http template.

    I say this because I have made modification to the http template and I do not have automatic updates enabled, and I do not have any problems with the template being overwritten.

    However, some people like automatic updates. My reason for doing manual updates is because I want to be aware of what is changing. With automatic updates, cPanel updates during the night and I may wake up in the morning with a lot of support tickets for issues that I don't fully understand yet because of the update. Again, this is just my personal preference and for some people automatic updates work best.

    Ideally the best solution would be for the cPanel developers to implement some type of template modification system, similar to the exim configuration that they have. But until they do that, you will either need to make your own accommodations regarding this or disable automatic updates (or perhaps a third option that I am not aware of).
     
  8. BrandMan211

    BrandMan211 Active Member

    Joined:
    Apr 6, 2007
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    It seems that when I update it manually it doesn't overwrite. I guess it's fixed then. I really wish a feature that prevents this is made because I enjoy automatic updates if there are no repercussions.
     
Loading...

Share This Page