Click to See Complete Forum and Search --> : 6 or 7 httpd's running


criatura
02-07-2003, 12:41 AM
when i 'ps -ef | grep httpd'
i get the following:

root 752 1 0 22:28 ? 00:00:00 /usr/sbin/httpd
apache 800 752 0 22:28 ? 00:00:00 /usr/sbin/httpd
apache 801 752 0 22:28 ? 00:00:00 /usr/sbin/httpd
apache 802 752 0 22:28 ? 00:00:00 /usr/sbin/httpd
apache 803 752 0 22:28 ? 00:00:00 /usr/sbin/httpd
apache 804 752 0 22:28 ? 00:00:00 /usr/sbin/httpd
apache 805 752 0 22:28 ? 00:00:00 /usr/sbin/httpd
apache 806 752 0 22:28 ? 00:00:00 /usr/sbin/httpd
apache 807 752 0 22:28 ? 00:00:00 /usr/sbin/httpd

is this supposed to happen? it seems a little excesive to be running 9 daemons. Everything works fine, im just wondering.

z0mbix
02-07-2003, 05:13 AM
The amount that run can be configured in yout httpd.conf file.

Gaston
02-07-2003, 05:15 AM
Shouldn't be a problem, you'll see there's one httpd process
started as root, the others are its child processes ran as
apache in your case. These processes are ran everytime
you start your apache, the number of child processes are
determined in httpd.conf file with "StartServers" directive.

More here:

http://httpd.apache.org/docs/mod/core.html#startservers

HighOrbit
02-07-2003, 10:18 AM
This is actually a security feature. Httpd's parent process is started as root to allow it to bind to its ports. But this parent process does not interact directly with incomming requests. Instead, it spawns child processes to serve incomming requests. That way, if one of the child processes is subverted, it will only run with the permissions of its own user (user "apache" in this case) instead of root privleges.

ixthus
02-07-2003, 10:28 AM
Originally posted by HighOrbit
This is actually a security feature. Httpd's parent process is started as root to allow it to bind to its ports. But this parent process does not interact directly with incomming requests. Instead, it spawns child processes to serve incomming requests. That way, if one of the child processes is subverted, it will only run with the permissions of its own user (user "apache" in this case) instead of root privleges.

ah ha, great explanation