⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perchild.html.en

📁 apache的软件linux版本
💻 EN
📖 第 1 页 / 共 2 页
字号:
      of the main server:</p>      <div class="example"><h3>Global config</h3><p><code>        NumServers 7<br />        ChildPerUserID user1 group1 2<br />        ChildPerUserID user2 group2 4      </code></p></div>      <p>Using unbalanced numbers of processes as above is useful, if the      particular virtual hosts produce different load. The assignment to      the virtual hosts is easily done as in the example below. In      conclusion with the example above the following assumes, that      <code>server2</code> has to serve about twice of the hits of      <code>server1</code>.</p>      <div class="example"><h3>Example</h3><p><code>        NameVirtualHost *<br />        <br />        &lt;VirtualHost *&gt;<br />        <span class="indent">          ServerName fallbackhost<br />          # no assignment; use fallback<br />        </span>        &lt;/VirtualHost&gt;<br />        <br />        &lt;VirtualHost *&gt;<br />        <span class="indent">          ServerName server1<br />          AssignUserID user1 group1<br />        </span>        &lt;/VirtualHost&gt;<br />        <br />        &lt;VirtualHost *&gt;<br />        <span class="indent">          ServerName server2<br />          AssignUserID user2 group2<br />        </span>        &lt;/VirtualHost&gt;      </code></p></div>    </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>Tie a virtual host to a user and group ID</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AssignUserID <var>user-id</var> <var>group-id</var></code></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 user/group combination. Requests    addressed to the virtual host where this directive appears will be    served by a process running with the specified user and group ID.</p>    <p>The user and group ID has to be assigned to a number of children    in the global server config using the <code class="directive"><a href="#childperuserid">ChildPerUserID</a></code> directive. See the section above for a    <a href="#user-ids">configuration example</a>.</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>Specify user ID and group ID for a number of childprocesses</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ChildPerUserID <var>user-id</var> <var>group-id</var><var>num-children</var></code></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 number of child processes.    The third argument, <var>num-children</var>, is the number of child    processes to start with the specified user and group. It does    <em>not</em> represent a specific child number. In order to use this    directive, the server must be run initially as <code>root</code>.    If you start the server as a non-root user, it will fail to change    to the lesser privileged user.</p>    <p>If the total number of child processes, found by totaling all of the    third arguments to all <code class="directive">ChildPerUserID</code> directives    in the config file, is less than <code class="directive"><a href="#numservers">NumServers</a></code>, then all remaining children will inherit 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.    See the section above for a <a href="#user-ids">configuration    example</a>.</p>    <div class="warning"><h3>Security</h3>      <p>Don't set <var>user-id</var> (or <var>group-id</var>) to      <code>root</code> unless you know exactly what you are doing, and      what the dangers are.</p>    </div></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="MaxThreadsPerChild" id="MaxThreadsPerChild">MaxThreadsPerChild</a> <a name="maxthreadsperchild" id="maxthreadsperchild">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum number of threads per child process</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxThreadsPerChild <var>number</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxThreadsPerChild 64</code></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>This directive sets the maximum number of threads that will be    created in each child process. To increase this value beyond its    default, it is necessary to change the value of the <code class="directive"><a href="../mod/mpm_common.html#threadlimit">ThreadLimit</a></code> directive and stop and    re-start the server.</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="NumServers" id="NumServers">NumServers</a> <a name="numservers" id="numservers">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Total number of children alive at the same time</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NumServers <var>number</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>NumServers 2</code></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>The <code class="directive">NumServers</code> directive determines the number    of children alive at the same time. This number should be large enough to    handle the requests for the entire site. To increase this value beyond the    value of <code>8</code>, it is necessary to change the value of the    <code class="directive"><a href="../mod/mpm_common.html#serverlimit">ServerLimit</a></code> directive and stop    and re-start the server. See the section above for a <a href="#user-ids">configuration example</a>.</p></div></div><div class="bottomlang"><p><span>Available Languages: </span><a href="../en/mod/perchild.html" title="English">&nbsp;en&nbsp;</a></p></div><div id="footer"><p class="apache">Copyright 2007 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -