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?
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):
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.
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 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..