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

📄 core.html.en

📁 Apache_2.0.59-Openssl_0.9 配置tomcat. Apache_2.0.59-Openssl_0.9 配置tomcat.
💻 EN
📖 第 1 页 / 共 5 页
字号:
        AllowOverride FileInfo<br />
      </span>
      &lt;/Directory&gt;
    </code></p></div>

    <p>for access to the document <code>/home/web/dir/doc.html</code>
    the steps are:</p>

    <ul>
      <li>Apply directive <code>AllowOverride None</code>
      (disabling <code>.htaccess</code> files).</li>

      <li>Apply directive <code>AllowOverride FileInfo</code> (for
      directory <code>/home</code>).</li>

      <li>Apply any <code>FileInfo</code> directives in
      <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
      <code>/home/web/dir/.htaccess</code> in that order.</li>
    </ul>

    <p>Regular expressions are not considered until after all of the
    normal sections have been applied. Then all of the regular
    expressions are tested in the order they appeared in the
    configuration file. For example, with</p>

    <div class="example"><p><code>
      &lt;Directory ~ abc$&gt;<br />
      <span class="indent">
        # ... directives here ...<br />
      </span>
      &lt;/Directory&gt;
    </code></p></div>

    <p>the regular expression section won't be considered until after
    all normal <code class="directive">&lt;Directory&gt;</code>s and
    <code>.htaccess</code> files have been applied. Then the regular
    expression will match on <code>/home/abc/public_html/abc</code> and
    the corresponding <code class="directive">&lt;Directory&gt;</code> will
    be applied.</p>

   <p><strong>Note that the default Apache access for
    <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
    This means that Apache will serve any file mapped from an URL. It is
    recommended that you change this with a block such
    as</strong></p>

    <div class="example"><p><code>
      &lt;Directory /&gt;<br />
      <span class="indent">
        Order Deny,Allow<br />
        Deny from All<br />
      </span>
      &lt;/Directory&gt;
    </code></p></div>

    <p><strong>and then override this for directories you
    <em>want</em> accessible. See the <a href="../misc/security_tips.html">Security Tips</a> page for more
    details.</strong></p>

    <p>The directory sections occur in the <code>httpd.conf</code> file.
    <code class="directive">&lt;Directory&gt;</code> directives
    cannot nest, and cannot appear in a <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> or <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section.</p>

<h3>See also</h3>
<ul>
<li><a href="../sections.html">How &lt;Directory&gt;,
    &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
    explanation of how these different sections are combined when a
    request is received</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="DirectoryMatch" id="DirectoryMatch">&lt;DirectoryMatch&gt;</a> <a name="directorymatch" id="directorymatch">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
file-system directories matching a regular expression and their
subdirectories</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;DirectoryMatch <var>regex</var>&gt;
... &lt;/DirectoryMatch&gt;</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</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>
</table>
    <p><code class="directive">&lt;DirectoryMatch&gt;</code> and
    <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
    of directives which will apply only to the named directory and
    sub-directories of that directory, the same as <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>. However, it
    takes as an argument a regular expression. For example:</p>

    <div class="example"><p><code>
      &lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
    </code></p></div>

    <p>would match directories in <code>/www/</code> that consisted of three
    numbers.</p>

<h3>See also</h3>
<ul>
<li><code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> for
a description of how regular expressions are mixed in with normal
<code class="directive">&lt;Directory&gt;</code>s</li>
<li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
&lt;Files&gt; sections work</a> for an explanation of how these different
sections are combined when a request is received</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="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible
from the web</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</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>
</table>
    <p>This directive sets the directory from which <code class="program"><a href="../programs/httpd.html">httpd</a></code>
    will serve files. Unless matched by a directive like <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code>, the server appends the
    path from the requested URL to the document root to make the
    path to the document. Example:</p>

    <div class="example"><p><code>
      DocumentRoot /usr/web
    </code></p></div>

    <p>then an access to
    <code>http://www.my.host.com/index.html</code> refers to
    <code>/usr/web/index.html</code>.</p>

    <p>The <code class="directive">DocumentRoot</code> should be specified without
    a trailing slash.</p>

<h3>See also</h3>
<ul>
<li><a href="../urlmapping.html">Mapping URLs to Filesystem
Location</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="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableMMAP On</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>
</table>
    <p>This directive controls whether the <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use
    memory-mapping if it needs to read the contents of a file during
    delivery.  By default, when the handling of a request requires
    access to the data within a file -- for example, when delivering a
    server-parsed file using <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> -- Apache
    memory-maps the file if the OS supports it.</p>

    <p>This memory-mapping sometimes yields a performance improvement.
    But in some environments, it is better to disable the memory-mapping
    to prevent operational problems:</p>

    <ul>
    <li>On some multiprocessor systems, memory-mapping can reduce the
    performance of the <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</li>
    <li>With an NFS-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code>,
    the <code class="program"><a href="../programs/httpd.html">httpd</a></code> may crash due to a segmentation fault if a file
    is deleted or truncated while the <code class="program"><a href="../programs/httpd.html">httpd</a></code> has it
    memory-mapped.</li>
    </ul>

    <p>For server configurations that are vulnerable to these problems,
    you should disable memory-mapping of delivered files by specifying:</p>

    <div class="example"><p><code>
      EnableMMAP Off
    </code></p></div>

    <p>For NFS mounted files, this feature may be disabled explicitly for
    the offending files by specifying:</p>

    <div class="example"><p><code>
      &lt;Directory "/path-to-nfs-files"&gt;
      <span class="indent">
        EnableMMAP Off
      </span>
      &lt;/Directory&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="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use the kernel sendfile support to deliver files to the client</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile On</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 version 2.0.44 and later</td></tr>
</table>
    <p>This directive controls whether <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use the
    sendfile support from the kernel to transmit file contents to the client.
    By default, when the handling of a request requires no access
    to the data within a file -- for example, when delivering a
    static file -- Apache uses sendfile to deliver the file contents
    without ever reading the file if the OS supports it.</p>

    <p>This sendfile mechanism avoids separate read and send operations,
    and buffer allocations. But on some platforms or within some
    filesystems, it is better to disable this feature to avoid
    operational problems:</p>

    <ul>
    <li>Some platforms may have broken sendfile support that the build
    system did not detect, especially if the binaries were built on
    another box and moved to such a machine with broken sendfile
    support.</li>
    <li>On Linux the use of sendfile triggers TCP-checksum
    offloading bugs on certain networking cards when using IPv6.</li>
    <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS or SMB),
    the kernel may be unable to serve the network file through
    its own cache.</li>
    </ul>

⌨️ 快捷键说明

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