Apache2 fails to start after rebooting droplet
After rebooting my droplet for the first time (using shutdown -h now from the command line, then powering on again from the control panel), I was able to ssh into my droplet again as normal, but all sites powered by the droplet refused to connect.
I tried to restart apache2:
sudo systemctl restart apache2
…but that returned a warning:
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
I used the status command indicated above which returned:
apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d └─apache2-systemd.conf Active: failed (Result: exit-code) since Fri 2017-03-31 19:28:24 UTC; 10s ago Docs: man:systemd-sysv-generator(8) Process: 1992 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
I checked the error log located at
…and found many weird errors related to one of the sites hosted on the droplet. Then I remembered that I had been trying to figure out how to enable caching on that site, and had made some changes to its conf file at /etc/apache2/sites-enabled/messedupsite.com.conf … perhaps that was the problem?