I have a droplet in DigitalOcean that connected to domain that purchased from GoDaddy. Using Apache2 for web server. Some times web site is down and any path in www/html folder is not working. It seems like it’s happening randomly. I am not sure about this but if I run “sudo systemctl status apache2” command when web site down, then web site comes back to work and I see everything is fine.
Ubuntu version: 20.04.1 LTS Apache2 version: 2.4.41
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!
Hello, @spektragamess
What is the output of the command when you execute:
- sudo systemctl status apache2
If the Apache server is down you will need to start/restart it with:
- sudo systemctl start apache2
or
- sudo systemctl restart apache2
What you can also do is to examine the Apache error log file in order to track down what is causing the issue. You can check the last 200 entries of the file with this command:
- tail -n 200 /var/log/apache2/error.log
And also check for out of memory or killed processes:
- grep -i oom /var/log/messages
and
- grep -i kill /var/log/messages
Hope that this helps! Regards, Alex
Hello,
Usually, when your service stops randomly there is an issue either with it along the line or your Droplet is running out of Memory.
The best place to check the error is your apache error log:
- tail -n 200 /var/log/apache2/error.log
From there you can see the exact error. From there you can take the appropriate actions.
If it’s out of memory, you can first try adding SWAP, and then if the issue continues, you’ll need to upgrade your Droplet.
If the problem lies elsewhere you’ll need to further troubleshoot the source. Having said that, it should be easy with you having the exact error.
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.