Apache 2.2 serving 404s and not logging after server reboot

I previously had Apache 2.2 running a few virtual hosts on my Ubuntu 12.12 Digital Ocean droplet. Then I wanted to increase the server RAM, so I quit with shutdown -h 0 (without stopping Apache, or anything else). I resized the RAM and rebooted the server on DigitalOcean with no issues.

When I checked out one of my sites, I found that nginx had started by default. Not deterred, I ran service nginx stop and service apache2 start, both of which appeared to work fine. But when I checked out a site again, I was served a generic Apache 404.

Most mysterious, Apache appears not to be logging these accesses — I couldn’t find them in the default /var/log/apache2/error.log (which did have the record of Apache’s restarts) nor in the virtual-host-specific file specified in the conf file.

I’ve tried restarting and reloading Apache, as well as disabling and enabling my various virtual hosts using a2ensite/a2dissite, to no avail. Any help/pointers would be much appreciated! Even just tracking down Apache’s logging of these 404s would be a big help.

Answer

This seems like a fairly standard case for rolling up your sleeves and erm being a sysadmin.

Check your current configuration against your documentation for changes.

Starting with the main Apache configuration file work through it to see if it does what you expect. Check to see if it correctly includes your enabled sites and if not add a suitable include directive.

Look for ErrorLog and CustomLog directives check that the files they define are created check the contents of those files.

Attribution
Source : Link , Question Author : Kyle , Answer Author : user9517

Leave a Comment