Monday, February 21, 2022

[SOLVED] Apache on Centos 7 abruptly dies

Issue

Since a few days, Apache on my Centos 7 server dies sometime after I restart it. I even tried to reboot the machine to no avail. Immediately afte resting it, it does respond, but afte a while it stop doing it an if I execute:

sudo systemctl status httpd.service

I get:

httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled) Active: inactive (dead)

I fixed the issue by reinstalling Apache.


Solution

The override they report using at https://bugs.archlinux.org/task/47110 goes in file /etc/logwatch/conf/override.conf

[Service]
Restart=always
RestartSec=10
ExecReload=/usr/bin/httpd -k graceful
ExecStart=
ExecStart=/usr/bin/httpd -k start -DFOREGROUND


Answered By - neallred
Answer Checked By - Pedro (WPSolving Volunteer)