Php – Apache Failure on Centos 7 not starting

apache-2.4httphttpdPHPpid

hellau everyone,

i have a problem, that i cant resolve alone, so i need your help.

i have installed on a centos 7 apache
when im asking for the status of the service (systemctl status httpd) so i got an error like this one:

  • Starting The Apache HTTP Server…
  • httpd.service operation timed out. Terminating httpd.service
    stopping timed out (2). Killing
  • Failed to start the Apache HTTP Server
  • Unit httpd.server entered failed state

i looked up in my error_log file (var/log/httpd/error_log/ and got this here

  • SELinux policy enabled: httpd running as context system_u:system_r:httpd_t:s0
  • suEXEC mechanism enabled (wrap per: /usr/sbin/suexec)
  • generation secret for digest authentification
  • no slotmen from mod_heartmonitor
  • pid file /run/httpd/httpd.pid overwritten — Unclean shutdown previous Apache run?
  • Apache/2.4.6 (CentOS) PHP/5.4.16. configured — resuming normal operations
  • Command line: '/usr/sbin/httpd – D FOREGROUND'

Yes, i have made this work and keyed this error statements, so i have no written the date and the information in []. i hope it is not so importent for resolve this problem.

i tried this already:

reboot
systemctl –failed (it confirms the failure)

i havent got any idea. Can someone give my food for thought.
Once it started, i tried to install icingaweb2 and now both is not working.

Thank you very much.
mira

Best Answer

You don't need to modify systemd configurations. This is more likely an Apache config error.

You probably need to load the systemd module for apache. In CentOS 7's default httpd config there is a file 00-systemd.conf which is pulled into the apache config using the module include line that has this information. I bet if you load that, you'll find you problem resolved.

$ cat conf.modules.d/00-systemd.conf
# This file configures systemd module:
LoadModule systemd_module modules/mod_systemd.so

This usually occurs if you are copying over a config from another system that doesn't use systemd or perhaps upgrading from Apache 2.2 to Apache 2.4 where that module include directive isn't in the httpd.conf.

Related Topic