CPixelsBen
11-11-2002, 03:01 PM
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?
mind21_98
11-11-2002, 06:14 PM
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.
CPixelsBen
11-11-2002, 06:33 PM
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.
mind21_98
11-11-2002, 06:43 PM
I'm not sure if they're aware of that issue. You may want to open a ticket with them just in case.
Techark
11-11-2002, 07:10 PM
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.
StevenG
11-12-2002, 05:43 AM
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..