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

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.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |