Bootstrap FreeKB - Apache (Web Server) - PID (process ID)
Apache (Web Server) - PID (process ID)

Updated:   |  Apache (Web Server) articles

The PID (process ID number) being used by an Apache web server will be stored in a file on the server. The web server configuration file (e.g. httpd.conf) contains the location of the file that contains the PID. In this example, the file is located at relative logs/httpd.pid

PidFile logs/httpd.pid

 

Viewing the file that contains the PID will show the PID currently associated with the web server. In this example, the PID is 12345.

~]# cat /path/to/logs/httpd.pid
12345

 

Likewise, the ps command can be used to view the PID being used by the web server. In this example, the web server has PID 12345.

~]# ps -ef | grep httpd
nobody  12345  1234  0  07:04  ?  00:00:00 -f /path/to/httpd.conf -k start
nobody  12345  1234  0  07:04  ?  00:00:00 -f /path/to/httpd.conf -k start
nobody  12345  1234  0  07:04  ?  00:00:00 -f /path/to/httpd.conf -k start
nobody  12345  1234  0  07:04  ?  00:00:00 -f /path/to/httpd.conf -k start

 

The PID is used to control certain things. For example, when the web server is started, it selects a certain PID that is reserved for the web server until the web server is stopped. The PID also controls the files that the web server writes events to.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 431e3a in the box below so that we can be sure you are a human.