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
/var/log/apache2/error.log
…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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi kelseybarmettler,
I am gland that you have resolved your problem your self.
I want to inform you that whenever you make any changes in any configuration file, please create a backup of the old one to some other place to server.if something goes wrong you can always restore the old one.
if you you can provide the output of error logs, we can analyze why the site was getting connect.
I edited my conf file for the site I had messed with, and deleted the following lines which I had earlier added:
CacheQuickHandler off
CacheLock on
CacheLockPath /tmp/mod_cache-lock
CacheLockMaxAge 5
CacheIgnoreHeaders Set-Cookie
<Location />
CacheEnable disk
CacheHeader on
CacheDefaultExpire 600
CacheMaxExpire 86400
CacheLastModifiedFactor 0.5
ExpiresActive on
ExpiresDefault "access plus 5 minutes"
</Location>
After saving and closing the file, I tried restarting apache2 again and it worked. All sites were back up. So for anyone experiencing the above error, perhaps look in the direction of a recently edited conf file? If anyone knows why what I did made Apache refuse to start, please share away. I just wanted to post my steps in case it helps someone in the same position.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.