We've been seeing a few reports of issues with the newer httpd binaries. I believe it started somewhere around apache 2.4.3+ where during a restart or reload, we're not exactly sure, the main httpd process doesn't actually quit, but the new process somehow manages to start a 2nd process.
When this happens you've got 2 master root httpd processes.. the old one is serving the old data (without a restart, hence "Apache is functioning normally"), but the new process does load the domain correctly, so you get the random result.
This only seems to happen on some boxes, seems to just be init.d, so mainly CentOS 6 (systemd is not affected).
We have updated our httpd_2 scripts, I believe we're at v2.6 of the /etc/init.d/httpd file, which you can find here:
Code:
wget -O /etc/init.d/httpd http://files.directadmin.com/services/custombuild/httpd_2
which is a symlink to the latest file, which right now is 2.6:
http://files.directadmin.com/services/custombuild/httpd_2-2.6
The change is basically to add extra code in the stop() function to ensure that all processes are actually stopped after the stop call, and if not, nuke whatever is left-over.
You can see if you've got a ghost copy of httpd running by typing:
Code:
ps axuf |grep /usr/sbin/httpd |grep -v grep | grep -c ^root
where we only want to ever see 1. If you see 2, then you've got a ghost of apache running and serving old data.
If that happens, ensure you have 2.6+ (check the top of the httpd boot script), and restart httpd.
The issue seems to be very random, and we're not 100% sure the trigger, as it cannot be reproduced on demand (but is
likely one of restart, reload, seen on system that do not use graceful but not ruled out as also affected)
John