Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Apache2 failing unexpectedly
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
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.×