📄 core.html.en
字号:
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Authorization realm for use in HTTPauthentication</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthName <var>auth-domain</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</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 name of the authorization realm for a directory. This realm is given to the client so that the user knows which username and password to send. <code class="directive">AuthName</code> takes a single argument; if the realm name contains spaces, it must be enclosed in quotation marks. It must be accompanied by <code class="directive"><a href="#authtype">AuthType</a></code> and <code class="directive"><a href="#require">Require</a></code> directives, and directives such as <code class="directive"><a href="../mod/mod_auth.html#authuserfile">AuthUserFile</a></code> and <code class="directive"><a href="../mod/mod_auth.html#authgroupfile">AuthGroupFile</a></code> to work.</p> <p>For example:</p> <div class="example"><p><code> AuthName "Top Secret" </code></p></div> <p>The string provided for the <code>AuthName</code> is what will appear in the password dialog provided by most browsers.</p><h3>See also</h3><ul><li><a href="../howto/auth.html">Authentication, Authorization, and Access Control</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="AuthType" id="AuthType">AuthType</a> <a name="authtype" id="authtype">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of user authentication</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthType Basic|Digest</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</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 selects the type of user authentication for a directory. Only <code>Basic</code> and <code>Digest</code> are currently implemented. It must be accompanied by <code class="directive"><a href="#authname">AuthName</a></code> and <code class="directive"><a href="#require">Require</a></code> directives, and directives such as <code class="directive"><a href="../mod/mod_auth.html#authuserfile">AuthUserFile</a></code> and <code class="directive"><a href="../mod/mod_auth.html#authgroupfile">AuthGroupFile</a></code> to work.</p><h3>See also</h3><ul><li><a href="../howto/auth.html">Authentication, Authorization,and Access Control</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="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGIscripts</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>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>NetWare only</td></tr></table> <p>This directive is used to control how Apache finds the interpreter used to run CGI scripts. For example, setting <code>CGIMapExtension sys:\foo.nlm .foo</code> will cause all CGI script files with a <code>.foo</code> extension to be passed to the FOO interpreter.</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="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Responseheaders</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ContentDigest Off</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>Options</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 enables the generation of <code>Content-MD5</code> headers as defined in RFC1864 respectively RFC2068.</p> <p>MD5 is an algorithm for computing a "message digest" (sometimes called "fingerprint") of arbitrary-length data, with a high degree of confidence that any alterations in the data will be reflected in alterations in the message digest.</p> <p>The <code>Content-MD5</code> header provides an end-to-end message integrity check (MIC) of the entity-body. A proxy or client may check this header for detecting accidental modification of the entity-body in transit. Example header:</p> <div class="example"><p><code> Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== </code></p></div> <p>Note that this can cause performance problems on your server since the message digest is computed on every request (the values are not cached).</p> <p><code>Content-MD5</code> is only sent for documents served by the <code class="module"><a href="../mod/core.html">core</a></code>, and not by any module. For example, SSI documents, output from CGI scripts, and byte range responses do not have this header.</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="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>MIME content-type that will be sent if theserver cannot determine a type in any other way</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>MIME-type</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType text/plain</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>There will be times when the server is asked to provide a document whose type cannot be determined by its MIME types mappings.</p> <p>The server must inform the client of the content-type of the document, so in the event of an unknown type it uses the <code>DefaultType</code>. For example:</p> <div class="example"><p><code> DefaultType image/gif </code></p></div> <p>would be appropriate for a directory which contained many GIF images with filenames missing the <code>.gif</code> extension.</p> <p>Note that unlike <code class="directive"><a href="#forcetype">ForceType</a></code>, this directive only provides the default mime-type. All other mime-type definitions, including filename extensions, that might identify the media type will override this default.</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="Directory" id="Directory"><Directory></a> <a name="directory" id="directory">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose a group of directives that apply only to thenamed file-system directory and sub-directories</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Directory <var>directory-path</var>>... </Directory></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"><Directory></code> and <code></Directory></code> are used to enclose a group of directives that will apply only to the named directory and sub-directories of that directory. Any directive that is allowed in a directory context may be used. <var>Directory-path</var> is either the full path to a directory, or a wild-card string using Unix shell-style matching. In a wild-card string, <code>?</code> matches any single character, and <code>*</code> matches any sequences of characters. You may also use <code>[]</code> character ranges. None of the wildcards match a `/' character, so <code><Directory /*/public_html></code> will not match <code>/home/user/public_html</code>, but <code><Directory /home/*/public_html></code> will match. Example:</p> <div class="example"><p><code> <Directory /usr/local/httpd/htdocs><br /> <span class="indent"> Options Indexes FollowSymLinks<br /> </span> </Directory> </code></p></div> <div class="note"> <p>Be careful with the <var>directory-path</var> arguments: They have to literally match the filesystem path which Apache uses to access the files. Directives applied to a particular <code><Directory></code> will not apply to files accessed from that same directory via a different path, such as via different symbolic links.</p> </div> <p>Extended regular expressions can also be used, with the addition of the <code>~</code> character. For example:</p> <div class="example"><p><code> <Directory ~ "^/www/.*/[0-9]{3}"> </code></p></div> <p>would match directories in <code>/www/</code> that consisted of three numbers.</p> <p>If multiple (non-regular expression) <code class="directive"><Directory></code> sections match the directory (or one of its parents) containing a document, then the directives are applied in the order of shortest match first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example, with</p> <div class="example"><p><code> <Directory /><br /> <span class="indent"> AllowOverride None<br /> </span> </Directory><br /> <br /> <Directory /home/><br /> <span class="indent"> AllowOverride FileInfo<br /> </span> </Directory> </code></p></div> <p>for access to the document <code>/home/web/dir/doc.html</code> the steps are:</p> <ul>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -