0

I inherited a Centos 7 server which has apigility installed. When I rebooted the server, the web service crashes. In the log files all I see is

[core:notice] [pid 3864] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [mpm_prefork:notice] [pid 3864] AH00169: caught SIGTERM, shutting down

If I then run '/usr/sbin/httpd -D FOREGROUND' as root the apache service starts.

There are a few issues. There is no /etc/init.d/apache2 file or similar. There is no "apache" service or similar.

I cannot find the startup script which invokes the apache service in the first place!

The log files are under /etc/httpd/logs . So I tried editing the /etc/httpd/conf/ files to enable debug logging but I do not see more data in the log files.

I need to figure out what invokes httpd when the server boots, and why it crashes... any thoughts would be appreciated.

  • 1
    The service name is 'httpd', not apache. This has been standard on CentOS / RHEL as long as I can remember. On CentOS 7, the systemd unit file should be at /etc/systemd/system/multi-user.target.wants/httpd.service if it's active, not in /etc/init.d/ as CentOS 7 uses SystemD. If it isn't there, check /usr/lib/systemd/system/httpd.service (which is what the first one should be symlinked to when enabled). – yoonix Jun 26 at 21:40
  • Thanks I found the file under /usr/lib/systemd/system/httpd.service – user186057 Jun 26 at 22:28
  • Thanks I found the file under /usr/lib/systemd/system/httpd.service Also, thanks to your tip I realized that in centos the command "systemctl status httpd.service" is very usefull... the service for some reason was dissabled. But if that is the case, why did I get a crash log when the server boots? – user186057 Jun 26 at 22:35
  • @yoonix the error message I was seeing is from when the server was shutting down.. not booting up! Please convert your comment into an answer in order to accept it. Thanks – user186057 Jun 27 at 12:54
1

Yoonix deserves this answer but he never returned to claim it: Found the file under /usr/lib/systemd/system/httpd.service Thanks to your tip I realized that in centos the command "systemctl status httpd.service" is very usefull... the service for some reason was dissabled.

  • I'm glad you figured it out. I gave an incomplete answer and you connected the dots. – yoonix Jun 29 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.