Commit 077873bd authored by Paul Querna's avatar Paul Querna
Browse files

- Add documentation on the new AcceptFilter directive.

- Update Listen with the optional protocol arg.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190982 13f79535-47bb-0310-9956-ffa450edef68
parent 18eacc4b
Loading
Loading
Loading
Loading
+53 −0
Changes for docs/manual/mod/core.html.en: 53 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ available</td></tr>
</div>
<div id="quickview"><h3 class="directives">Directives</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
@@ -95,6 +96,58 @@ available</td></tr>
</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="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures optimizations for a Protocol's Listener Sockets</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</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>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1.5 and later</td></tr>
</table>
    <p>This directive enables operating system specific optimizations for a 
       listening socket by the Protocol type. The basic premise is for the 
       kernel to not send a socket to the server process until either data 
       is received or an entire HTTP Request is buffered. Only
       <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
       FreeBSD's Accept Filters</a> and Linux's more primitive 
       <code>TCP_DEFER_ACCEPT</code> are currently supported.</p>

    <p>The default values on FreeBSD are:</p>
    <div class="example"><p><code>
        AcceptFilter http httpready <br />
        AcceptFilter https dataready
    </code></p></div>
    
    <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
       the kernel level.  Once an entire request is recieved, the kernel then 
       sends it to the server. See the 
       <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
       accf_http(9)</a> man page for more details.  Since HTTPS requests are 
       encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&amp;sektion=9">
       accf_data(9)</a> filter is used.</p>

    <p>The default values on Linux are:</p>
    <div class="example"><p><code>
        AcceptFilter http data <br />
        AcceptFilter https data
    </code></p></div>

    <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
       requests.  Any value besides <code>none</code> will enable 
       <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
       see the Linux 
       <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
       tcp(7)</a> man page.</p>

    <p>Using <code>none</code> for an argument will disable any accept filters 
       for that protocol.  This is useful for protocols that require a server
       send data first, such as <code>nntp</code>:</p>
    <div class="example"><p><code>AcceptFilter nttp none</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="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directive</a></h2>
<table class="directive">
+51 −0
Changes for docs/manual/mod/core.xml: 51 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -27,6 +27,57 @@
available</description>
<status>Core</status>

<directivesynopsis>
<name>AcceptFilter</name>
<description>Configures optimizations for a Protocol's Listener Sockets</description>
<syntax>AcceptFilter <var>protocol</var> <var>accept_filter</var></syntax>
<contextlist><context>server config</context></contextlist>
<compatibility>Available in Apache 2.1.5 and later</compatibility>

<usage>
    <p>This directive enables operating system specific optimizations for a 
       listening socket by the Protocol type. The basic premise is for the 
       kernel to not send a socket to the server process until either data 
       is received or an entire HTTP Request is buffered. Only
       <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
       FreeBSD's Accept Filters</a> and Linux's more primitive 
       <code>TCP_DEFER_ACCEPT</code> are currently supported.</p>

    <p>The default values on FreeBSD are:</p>
    <example>
        AcceptFilter http httpready <br/>
        AcceptFilter https dataready
    </example>
    
    <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
       the kernel level.  Once an entire request is recieved, the kernel then 
       sends it to the server. See the 
       <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
       accf_http(9)</a> man page for more details.  Since HTTPS requests are 
       encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&amp;sektion=9">
       accf_data(9)</a> filter is used.</p>

    <p>The default values on Linux are:</p>
    <example>
        AcceptFilter http data <br/>
        AcceptFilter https data
    </example>

    <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
       requests.  Any value besides <code>none</code> will enable 
       <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
       see the Linux 
       <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
       tcp(7)</a> man page.</p>

    <p>Using <code>none</code> for an argument will disable any accept filters 
       for that protocol.  This is useful for protocols that require a server
       send data first, such as <code>nntp</code>:</p>
    <example>AcceptFilter nttp none</example>

</usage>
</directivesynopsis>

<directivesynopsis>
<name>AcceptPathInfo</name>
<description>Resources accept trailing pathname information</description>
+2 −1
Changes for docs/manual/mod/directives.html.en: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -41,7 +41,8 @@
<p class="letters"><a href="#A">&nbsp;A&nbsp;</a> | <a href="#B">&nbsp;B&nbsp;</a> | <a href="#C">&nbsp;C&nbsp;</a> | <a href="#D">&nbsp;D&nbsp;</a> | <a href="#E">&nbsp;E&nbsp;</a> | <a href="#F">&nbsp;F&nbsp;</a> | <a href="#G">&nbsp;G&nbsp;</a> | <a href="#H">&nbsp;H&nbsp;</a> | <a href="#I">&nbsp;I&nbsp;</a> | <a href="#K">&nbsp;K&nbsp;</a> | <a href="#L">&nbsp;L&nbsp;</a> | <a href="#M">&nbsp;M&nbsp;</a> | <a href="#N">&nbsp;N&nbsp;</a> | <a href="#O">&nbsp;O&nbsp;</a> | <a href="#P">&nbsp;P&nbsp;</a> | <a href="#R">&nbsp;R&nbsp;</a> | <a href="#S">&nbsp;S&nbsp;</a> | <a href="#T">&nbsp;T&nbsp;</a> | <a href="#U">&nbsp;U&nbsp;</a> | <a href="#V">&nbsp;V&nbsp;</a> | <a href="#W">&nbsp;W&nbsp;</a> | <a href="#X">&nbsp;X&nbsp;</a></p>
</div>
<div id="directive-list"><ul>
<li><a href="mpm_common.html#acceptmutex" id="A" name="A">AcceptMutex</a></li>
<li><a href="core.html#acceptfilter" id="A" name="A">AcceptFilter</a></li>
<li><a href="mpm_common.html#acceptmutex">AcceptMutex</a></li>
<li><a href="core.html#acceptpathinfo">AcceptPathInfo</a></li>
<li><a href="core.html#accessfilename">AccessFileName</a></li>
<li><a href="mod_actions.html#action">Action</a></li>
+19 −3
Changes for docs/manual/mod/mpm_common.html.en: 19 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -229,11 +229,12 @@ requests</td></tr>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>IP addresses and ports that the server
listens to</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Listen [<var>IP-address</var>:]<var>portnumber</var></code></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/leader.html">leader</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/perchild.html">perchild</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/threadpool.html">threadpool</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>Required directive since Apache 2.0</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/leader.html">leader</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/perchild.html">perchild</a></code>, <code class="module"><a href="../mod/prefork.html">prefork</a></code>, <code class="module"><a href="../mod/threadpool.html">threadpool</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
@@ -276,12 +277,27 @@ listens to</td></tr>
      Listen [fe80::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 443:</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>
+19 −2
Changes for docs/manual/mod/mpm_common.xml: 19 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -258,14 +258,16 @@ of the daemon</description>
<name>Listen</name>
<description>IP addresses and ports that the server
listens to</description>
<syntax>Listen [<var>IP-address</var>:]<var>portnumber</var></syntax>
<syntax>Listen [<var>IP-address</var>:]<var>portnumber</var> [<var>protocol</var>]</syntax>
<contextlist><context>server config</context></contextlist>
<modulelist><module>beos</module><module>leader</module>
<module>mpm_netware</module><module>mpm_winnt</module>
<module>mpmt_os2</module><module>perchild</module>
<module>prefork</module><module>threadpool</module><module>worker</module>
<module>event</module>
</modulelist>
<compatibility>Required directive since Apache 2.0</compatibility>
<compatibility>Required directive since Apache 2.0<br/>
The <var>protocol</var> argument was added in 2.1.5</compatibility>

<usage>
    <p>The <directive>Listen</directive> directive instructs Apache to
@@ -309,11 +311,26 @@ listens to</description>
      Listen [fe80::a00:20ff:fea7:ccea]:80
    </example>

    <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 
       <directive module="core">AcceptFilter</directive> 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 443:</p>

    <example>
      Listen 192.170.2.1:8443 https
    </example>

    <note><title>Error condition</title>
      Multiple <directive>Listen</directive> directives for the same ip
      address and port will result in an <code>Address already in use</code>
      error message.
    </note>

</usage>
<seealso><a href="../dns-caveats.html">DNS Issues</a></seealso>
<seealso><a href="../bind.html">Setting which addresses and ports Apache
Loading