I am running Ubuntu 20.04 as a web server on a cloud instance. There I have installed apache 2. Daily, I need to restart the instance or the apache2.service to restore access to the website.
sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2021-08-31 19:45:10 UTC; 3h 50min ago Docs: https://httpd.apache.org/docs/2.4/ Main PID: 1092 (code=exited, status=1/FAILURE) Aug 31 19:42:17 bhub systemd: Starting The Apache HTTP Server... Aug 31 19:42:18 bhub systemd: Started The Apache HTTP Server. Aug 31 19:45:10 bhub systemd: apache2.service: Main process exited, code=exited, status=1/FAILURE Aug 31 19:45:10 bhub systemd: apache2.service: Failed with result 'exit-code'.
sudo apache2ctl configtest
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!