Results 1 to 6 of 6
  1. #1

    httpd.conf missing entries

    Greetings,

    Has anyone had the problem of httpd.conf entries just disappearing? That is to say, the virtual host entry for a domain on the server, and the sometimes the virtual host entry for subdomain just disappears out of httpd.conf? Anybody seen this happen before, or heard of it before? If so, got any idea how I go about making sure it doesn't happen. As a precaution I wrote a couple of simple shell scripts to backup the httpd.conf file on a daily and weekly basis. However, I would like to know what's causing this or if anyone has any ideas what might be causing this?
    Ben Prince - CyberPixels
    Systems Administrator
    [email protected]
    AIM: CyberPixelsBen

  2. #2
    Join Date
    Dec 2000
    Location
    San Diego, CA
    Posts
    1,571
    Is this in CPanel? Sometimes bugs pop up that cause that to occur. It also keeps its own backup using RCS. You can use the "co" command to restore httpd.conf:

    1. Log in as root to the server.
    2. cd /etc/httpd/conf
    3. Run less on httpd.conf. You'll see something like this (taken from my server):

    head 1.16;
    access;
    symbols;
    locks
    root:1.16; strict;
    comment @# @;

    Those lines indicate 1.16 is the latest version on file. Write that down somewhere.

    4. Push 'q' to get out of less. Subtract one from the version you wrote down (1.16 becomes 1.15, 1.15 becomes 1.14, etc) and run "co -r[version] httpd.conf,v" (without quotes, replacing [version] with the new version).
    5. If doing that restores the missing <VirtualHost> entries, stop. Otherwise, keep decrementing version numbers until you hit 1.1 and use those numbers in Step 4.
    6. Once the blocks are restored, you can restart Apache.

    I hope this helps.
    -Mooneer
    Thoughtbug Software: Hosting shouldn't require any thought.
    Legitimate host? Support the Code of Ethical Conduct

  3. #3

    Yes, its CPanel

    Is this in CPanel? Sometimes bugs pop up that cause that to occur
    Do you happen to know if CPanel is aware of this error? Or should I open ticket with them about it?

    Thanks for all your help.
    Ben Prince - CyberPixels
    Systems Administrator
    [email protected]
    AIM: CyberPixelsBen

  4. #4
    Join Date
    Dec 2000
    Location
    San Diego, CA
    Posts
    1,571
    I'm not sure if they're aware of that issue. You may want to open a ticket with them just in case.
    -Mooneer
    Thoughtbug Software: Hosting shouldn't require any thought.
    Legitimate host? Support the Code of Ethical Conduct

  5. #5
    Join Date
    Apr 2002
    Location
    USA
    Posts
    5,779
    Hmm lots of work there mind21_98, why not just go to whm backup and roll back to the httpd config files? They are all listed all you do is click the back arrow to the one you want and click backup.

    Yes this a bug and no one knows why I had my entire httpd.conf file eaten on two servers at the same time. Nick spent a while going over my servers and we could not come up with a good reason. But backtraking on both servers it happened right after a reseller had deleted and recreated a account mutliple times. So I suspect it has something to do with that. I have since asked my all my resellers to not delete and recreate an account more than once and it has not happend since.

    But you never know.

  6. #6
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,572
    But backtraking on both servers it happened right after a reseller had deleted and recreated a account mutliple times. So I suspect it has something to do with that. I have since asked my all my resellers to not delete and recreate an account more than once and it has not happend since.
    Yes .. nearly every time someone does that, apache will fail.. i have put it down to them not allowing enough time for the page in whm to reload after creating or deleting the account..(my thinking anyway) it is a problem indeed and does seem to only happen after multiple , quick deletes..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •