📄 core.html.en
字号:
<?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>core - 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.2</p><img alt="" src="../images/feather.gif" /></div><div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div><div id="path"><a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">Modules</a></div><div id="page-content"><div id="preamble"><h1>Apache Core Features</h1><div class="toplang"><p><span>Available Languages: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |<a href="../en/mod/core.html" title="English"> en </a> |<a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="T黵k鏴"> tr </a></p></div><table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Core Apache HTTP Server features that are alwaysavailable</td></tr><tr><th><a href="module-dict.html#Status">Status:</a></th><td>Core</td></tr></table></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><li><img alt="" src="../images/down.gif" /> <a href="#addoutputfilterbytype">AddOutputFilterByType</a></li><li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li><li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li><li><img alt="" src="../images/down.gif" /> <a href="#authname">AuthName</a></li><li><img alt="" src="../images/down.gif" /> <a href="#authtype">AuthType</a></li><li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li><li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li><li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li><li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li><li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li><li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li><li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li><li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li><li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li><li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li><li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li><li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li><li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li><li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li><li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li><li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li><li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li><li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li><li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li><li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li><li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li><li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li><li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li><li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li><li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li><li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li><li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li><li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li><li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li><li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li><li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li><li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li><li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li><li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li><li><img alt="" src="../images/down.gif" /> <a href="#require">Require</a></li><li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li><li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li><li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li><li><img alt="" src="../images/down.gif" /> <a href="#satisfy">Satisfy</a></li><li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li><li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li><li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li><li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li><li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li><li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li><li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li><li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li><li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li><li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li><li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li><li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li><li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li><li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li><li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li><li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></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="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&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 received, the kernel then sends it to the server. See the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&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&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 nntp 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"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Resources accept trailing pathname information</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</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.0.30 and later</td></tr></table> <p>This directive controls whether requests that contain trailing pathname information that follows an actual filename (or non-existent file in an existing directory) will be accepted or rejected. The trailing pathname information can be made available to scripts in the <code>PATH_INFO</code> environment variable.</p> <p>For example, assume the location <code>/test/</code> points to a directory that contains only the single file <code>here.html</code>. Then requests for <code>/test/here.html/more</code> and <code>/test/nothere.html/more</code> both collect <code>/more</code> as <code>PATH_INFO</code>.</p> <p>The three possible arguments for the <code class="directive">AcceptPathInfo</code> directive are:</p> <dl> <dt><code>Off</code></dt><dd>A request will only be accepted if it maps to a literal path that exists. Therefore a request with trailing pathname information after the true filename such as <code>/test/here.html/more</code> in the above example will return a 404 NOT FOUND error.</dd> <dt><code>On</code></dt><dd>A request will be accepted if a leading path component maps to a file that exists. The above example <code>/test/here.html/more</code> will be accepted if <code>/test/here.html</code> maps to a valid file.</dd> <dt><code>Default</code></dt><dd>The treatment of requests with trailing pathname information is determined by the <a href="../handler.html">handler</a> responsible for the request. The core handler for normal files defaults to rejecting <code>PATH_INFO</code> requests. Handlers that serve scripts, such as <a href="mod_cgi.html">cgi-script</a> and <a href="mod_isapi.html">isapi-handler</a>, generally accept <code>PATH_INFO</code> by default.</dd> </dl> <p>The primary purpose of the <code>AcceptPathInfo</code> directive is to allow you to override the handler's choice of accepting or rejecting <code>PATH_INFO</code>. This override is required, for example, when you use a <a href="../filter.html">filter</a>, such as <a href="mod_include.html">INCLUDES</a>, to generate content based on <code>PATH_INFO</code>. The core handler would usually reject the request, so you can use the following configuration to enable such a script:</p> <div class="example"><p><code> <Files "mypaths.shtml"><br /> <span class="indent"> Options +Includes<br /> SetOutputFilter INCLUDES<br /> AcceptPathInfo On<br /> </span> </Files>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -