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

📄 mpm_common.html.en

📁 Apache官方在今天放出产品系列2.2的最新版本2.2.11的源码包 最流行的HTTP服务器软件之一
💻 EN
📖 第 1 页 / 共 5 页
字号:
</table>    <p>For safety reasons this directive is only available if the server was    configured with the <code>--enable-exception-hook</code> option. It    enables a hook that allows external modules to plug in and do something    after a child crashed.</p>        <p>There are already two modules, <code>mod_whatkilledus</code> and    <code>mod_backtrace</code> that make use of this hook. Please have a    look at Jeff Trawick's <a href="http://www.apache.org/~trawick/exception_hook.html">EnableExceptionHook site</a> for more information about these.</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="GracefulShutdownTimeout" id="GracefulShutdownTimeout">GracefulShutdownTimeout</a> <a name="gracefulshutdowntimeout" id="gracefulshutdowntimeout">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Specify a timeout after which a gracefully shutdown serverwill exit.</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>GracefulShutDownTimeout <var>seconds</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>GracefulShutDownTimeout 0</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><code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code>, <code class="module"><a href="../mod/event.html">event</a></code></td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.2 and later</td></tr></table>    <p>The <code class="directive">GracefulShutdownTimeout</code> specifies    how many seconds after receiving a "graceful-stop" signal, a     server should continue to run, handling the existing connections.</p>    <p>Setting this value to zero means that the server will wait    indefinitely until all remaining requests have been fully served.</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="Group" id="Group">Group</a> <a name="group" id="group">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Group under which the server will answerrequests</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Group <var>unix-group</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Group #-1</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><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only valid in global server config since Apache2.0</td></tr></table>    <p>The <code class="directive">Group</code> directive sets the group under    which the server will answer requests. 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    specified group, and will instead continue to run as the group of the    original user. <var>Unix-group</var> is one of:</p>    <dl>      <dt>A group name</dt>      <dd>Refers to the given group by name.</dd>      <dt><code>#</code> followed by a group number.</dt>      <dd>Refers to a group by its number.</dd>    </dl>    <div class="example"><h3>Example</h3><p><code>      Group www-group    </code></p></div>    <p>It is recommended that you set up a new group specifically for    running the server. Some admins use user <code>nobody</code>,    but this is not always possible or desirable.</p>    <div class="warning"><h3>Security</h3>      <p>Don't set <code class="directive">Group</code> (or <code class="directive"><a href="#user">User</a></code>) to <code>root</code> unless      you know exactly what you are doing, and what the dangers are.</p>    </div>    <p>Special note: Use of this directive in <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> is no longer supported. To    configure your server for <code class="program"><a href="../programs/suexec.html">suexec</a></code> use    <code class="directive"><a href="../mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code>.</p>    <div class="note"><h3>Note</h3>      <p>Although the <code class="directive">Group</code> directive is present      in the <code class="module"><a href="../mod/beos.html">beos</a></code> and <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code> MPMs,      it is actually a no-op there and only exists for compatibility      reasons.</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="Listen" id="Listen">Listen</a> <a name="listen" id="listen">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>IP addresses and ports that the serverlistens to</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Listen [<var>IP-address</var>:]<var>portnumber</var> [<var>protocol</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><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code>, <code class="module"><a href="../mod/event.html">event</a></code></td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Required directive since Apache 2.0<br />The <var>protocol</var> argument was added in 2.1.5</td></tr></table>    <p>The <code class="directive">Listen</code> directive instructs Apache to    listen to only specific IP addresses or ports; by default it    responds to requests on all IP interfaces. <code class="directive">Listen</code>    is now a required directive. If it is not in the config file, the    server will fail to start. This is a change from previous versions    of Apache.</p>    <p>The <code class="directive">Listen</code> directive tells the server to    accept incoming requests on the specified port or address-and-port    combination. If only a port number is specified, the server listens to    the given port on all interfaces. If an IP address is given as well    as a port, the server will listen on the given port and    interface.</p>    <p>Multiple <code class="directive">Listen</code> directives may be used to    specify a number of addresses and ports to listen to. The server will    respond to requests from any of the listed addresses and ports.</p>    <p>For example, to make the server accept connections on both    port 80 and port 8000, use:</p>    <div class="example"><p><code>      Listen 80<br />      Listen 8000    </code></p></div>    <p>To make the server accept connections on two specified    interfaces and port numbers, use </p>    <div class="example"><p><code>      Listen 192.170.2.1:80<br />      Listen 192.170.2.5:8000    </code></p></div>    <p>IPv6 addresses must be surrounded in square brackets, as in the    following example:</p>    <div class="example"><p><code>      Listen [2001:db8::a00:20ff:fea7:ccea]:80    </code></p></div>    <p>The optional <var>protocol</var> argument is not required for most        configurations. If not specified, <code>https</code> is the default for        port 443 and <code>http</code> the default for all other ports.  The        protocol is used to determine which module should handle a request, and       to apply protocol specific optimizations with the        <code class="directive"><a href="../mod/core.html#acceptfilter">AcceptFilter</a></code> directive.</p>    <p>You only need to set the protocol if you are running on non-standard        ports.  For example, running an <code>https</code> site on port 8443:</p>    <div class="example"><p><code>      Listen 192.170.2.1:8443 https    </code></p></div>    <div class="note"><h3>Error condition</h3>      Multiple <code class="directive">Listen</code> directives for the same ip      address and port will result in an <code>Address already in use</code>      error message.    </div><h3>See also</h3><ul><li><a href="../dns-caveats.html">DNS Issues</a></li><li><a href="../bind.html">Setting which addresses and ports Apache    uses</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="ListenBackLog" id="ListenBackLog">ListenBackLog</a> <a name="listenbacklog" id="listenbacklog">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum length of the queue of pending connections</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ListenBacklog <var>backlog</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ListenBacklog 511</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><code class="module"><a href="../mod/beos.html">beos</a></code>, <code class="module"><a href="../mod/mpm_netware.html">mpm_netware</a></code>, <code class="module"><a href="../mod/mpm_winnt.html">mpm_winnt</a></code>, <code class="module"><a href="../mod/mpmt_os2.html">mpmt_os2</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/worker.html">worker</a></code></td></tr></table>    <p>The maximum length of the queue of pending connections.    Generally no tuning is needed or desired, however on some    systems it is desirable to increase this when under a TCP SYN    flood attack. See the backlog parameter to the    <code>listen(2)</code> system call.</p>    <p>This will often be limited to a smaller number by the    operating system. This varies from OS to OS. Also note that    many OSes do not use exactly what is specified as the backlog,    but use a number based on (but normally larger than) what is    set.</p>

⌨️ 快捷键说明

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