<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              This file is generated from xml source: DO NOT EDIT
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      --><title>perchild - Apache HTTP Server</title><link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /><link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /><link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link href="../images/favicon.ico" rel="shortcut icon" /></head><body><div id="page-header"><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p><p class="apache">Apache HTTP Server Version 2.0</p><img alt="" src="../images/feather.gif" /></div><div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div><div id="path"><a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs-project/">Documentation</a> &gt; <a href="../">Version 2.0</a> &gt; <a href="./">Modules</a></div><div id="page-content"><div id="preamble"><h1>Apache Module perchild</h1><table class="module"><tr><th><a href="module-dict.html#Description">Description:
                  </a></th><td>Multi-Processing Module allowing for daemon processes
    serving requests to be assigned a variety of different
    userids</td></tr><tr><th><a href="module-dict.html#Status">Status:
                  </a></th><td>MPM</td></tr><tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:
                  </a></th><td>mpm_perchild_module</td></tr><tr><th><a href="module-dict.html#SourceFile">Source File:
                  </a></th><td>perchild.c</td></tr></table><h3>Summary</h3>
<div class="warning">
This MPM does not currently work on most platforms.  Work is ongoing to
make it functional.
</div>

    <p>This Multi-Processing Module (MPM) implements a hybrid
    multi-process, multi-threaded web server. A fixed number of
    processes create threads to handle requests. Fluctuations in
    load are handled by increasing or decreasing the number of
    threads in each process.</p>

    <p>A single control process launches the number of child processes
    indicated by the <code class="directive"><a href="../mod/mpm_common.html#numservers">NumServers</a></code> directive at server
    startup. Each child process creates threads as specified in the
    <code class="directive"><a href="../mod/mpm_common.html#startthreads">StartThreads</a></code> directive.
    The individual threads then
    listen for connections and serve them when they arrive.</p>

    <p>Apache always tries to maintain a pool of <em>spare</em> or
    idle server threads, which stand ready to serve incoming
    requests. In this way, clients do not need to wait for new
    threads to be created. For each child process, Apache assesses
    the number of idle threads and creates or destroys threads to
    keep this number within the boundaries specified by
    <code class="directive"><a href="../mod/mpm_common.html#minsparethreads">MinSpareThreads</a></code>
    and <code class="directive"><a href="../mod/mpm_common.html#maxsparethreads">MaxSpareThreads</a></code>.
    Since this process is very self-regulating, it is rarely
    necessary to modify these directives from their default values.
    The maximum number of clients that may be served simultaneously
    is determined by multiplying the number of server processes
    that will be created (<code class="directive"><a href="../mod/mpm_common.html#numservers">NumServers</a></code>) by the maximum
    number of threads created in each process
    (<code class="directive"><a href="../mod/mpm_common.html#maxthreadsperchild">MaxThreadsPerChild</a></code>).</p>

    <p>While the parent process is usually started as root under
    Unix in order to bind to port 80, the child processes and
    threads are launched by Apache as a less-privileged user. The
    <code class="directive"><a href="../mod/mpm_common.html#user">User</a></code> and <code class="directive"><a href="../mod/mpm_common.html#group">Group</a></code> directives are used to
    set the privileges of the Apache child processes. The child
    processes must be able to read all the content that will be
    served, but should have as few privileges beyond that as
    possible. In addition, unless <a href="../suexec.html">suexec</a> is used, these directives also
    set the privileges which will be inherited by CGI scripts.</p>

    <p><code class="directive"><a href="../mod/mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a></code>
    controls how frequently the
    server recycles processes by killing old ones and launching new
    ones.</p>

    <p>See also: <a href="../bind.html">Setting which addresses and
    ports Apache uses</a>.</p>

    <p>In addition it adds the extra ability to specify that
    specific processes should serve requests under different
    userids. These processes can then be associated with specific
    virtual hosts.</p>
    
</div><div id="quickview"><h3 class="directives">Directives</h3><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#assignuserid">AssignUserId</a></li><li><img alt="" src="../images/down.gif" /> <a href="#childperuserid">ChildPerUserId</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#coredumpdirectory">CoreDumpDirectory</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#group">Group</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listen">Listen</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#listenbacklog">ListenBacklog</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#lockfile">LockFile</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxsparethreads">MaxSpareThreads</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#maxthreadsperchild">MaxThreadsPerChild</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#minsparethreads">MinSpareThreads</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#numservers">NumServers</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#pidfile">PidFile</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#scoreboardfile">ScoreBoardFile</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#sendbuffersize">SendBufferSize</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#startthreads">StartThreads</a></li><li><img alt="" src="../images/right.gif" /> <a href="mpm_common.html#user">User</a></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AssignUserId" id="AssignUserId">AssignUserId</a> <a name="assignuserid" id="assignuserid">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
              </a></th><td /></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
              </a></th><td>AssignUserID <em>user_id</em> <em>group_id</em></td></tr><tr><th><a href="directive-dict.html#Context">Context:
              </a></th><td>virtual host</td></tr><tr><th><a href="directive-dict.html#Status">Status:
              </a></th><td>MPM</td></tr><tr><th><a href="directive-dict.html#Module">Module:
              </a></th><td>perchild</td></tr></table>
    <p>Tie a virtual host to a specific child process. Requests addressed to
the virtual host where this directive appears will be served by the process
running with the specified user and group id.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="ChildPerUserId" id="ChildPerUserId">ChildPerUserId</a> <a name="childperuserid" id="childperuserid">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
              </a></th><td /></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
              </a></th><td>ChildPerUserID <em>user_id</em>
<em>group_id</em> <em>child_id</em></td></tr><tr><th><a href="directive-dict.html#Context">Context:
              </a></th><td>server config</td></tr><tr><th><a href="directive-dict.html#Status">Status:
              </a></th><td>MPM</td></tr><tr><th><a href="directive-dict.html#Module">Module:
              </a></th><td>perchild</td></tr></table>
<p>Specify a user id and group id for a specific child process. The number of
children is set by the <code class="directive"><a href="../mod/mpm_common.html#numservers">NumServers</a></code>
directive. For example, the default value for <code class="directive"><a href="../mod/mpm_common.html#numservers">NumServers</a></code> is 5 and that means
children ids 1,2,3,4 and 5 are available for assigment. If a child does not
have an associated ChildPerUserID, it inherits the <code class="directive"><a href="../mod/mpm_common.html#user">User</a></code> and <code class="directive"><a href="../mod/mpm_common.html#group">Group</a></code> settings from the main server </p> 
</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div></body></html>