Why Can’t You Find the Linux Process for Apache Web Service That Appears to Be Running?

Problem scenario
You think the Apache web server is running.  You can see the web page from a web browser or your coworkers tell you that it is running.  You are not 100% sure however.  You want to see the Linux pid (process ID) for Apache web service that is running.  You run this:

ps -ef | grep httpd

You do not see any services running.  But you think that the Apache web service is in fact running.  Can Apache web service be running without an httpd process?

Solution
Run this:

ps -ef | grep apache

In Ubuntu Linux, Apache web server does not run with the httpd process.  It runs with a process with the string "apache".

If you still do not see an apache process running, it could be running in Docker.  Perhaps the web server you see is from a different server.  Sometimes with NAT or containers, IP addresses can become confused.

Leave a comment

Your email address will not be published.