mirror of
https://github.com/apache/httpd.git
synced 2025-08-26 05:42:34 +03:00
Submitted by: Dean Gaudet The docs show some examples using <Limit GET POST> ... </Limit> where the <Limit>s are not strictly required. Since it is less secure to specify them than it is to leave them out I think the examples should be modified. If they're to be left in, then some of them need < ... >. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@77548 13f79535-47bb-0310-9956-ffa450edef68
53 lines
1.7 KiB
HTML
53 lines
1.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>Access Control by URL</TITLE>
|
|
</HEAD>
|
|
|
|
<BODY>
|
|
<!--#include virtual="header.html" -->
|
|
<H1>Access Control by URL</H1>
|
|
|
|
<h2><a name="location">The <code><Location></code> Directive</a></h2>
|
|
|
|
<strong>Syntax:</strong> <Location <em>URL prefix</em>><br>
|
|
<strong>Context:</strong> server config, virtual host<br>
|
|
<strong>Status:</strong> core<br>
|
|
|
|
<p>The <Location> directive provides for access control by
|
|
URL. It is comparable to the <a
|
|
href="mod/core.html#directory"><Directory></a> directive, and
|
|
should be matched with a </Location> directive. Directives that
|
|
apply to the URL given should be listen
|
|
within. <code><Location></code> sections are processed in the
|
|
order they appear in the configuration file, after the
|
|
<Directory> sections and <code>.htaccess</code> files are
|
|
read.</p>
|
|
|
|
<p>Note that, due to the way HTTP functions, <em>URL prefix</em>
|
|
should, save for proxy requests, be of the form <code>/path/</code>,
|
|
and should not include the <code>http://servername</code>. It doesn't
|
|
necessarily have to protect a directory (it can be an individual
|
|
file, or a number of files), and can include wild-cards. In a wild-card
|
|
string, `?' matches any single character, and `*' matches any
|
|
sequences of characters.
|
|
|
|
<p>This functionality is especially useful when combined with the
|
|
<code><a href="mod/mod_mime.html#sethandler">SetHandler</a></code>
|
|
directive. For example, to enable status requests, but allow them only
|
|
from browsers at foo.com, you might use:
|
|
|
|
<pre>
|
|
<Location /status>
|
|
SetHandler server-status
|
|
order deny,allow
|
|
deny from all
|
|
allow from .foo.com
|
|
</Location>
|
|
</pre>
|
|
|
|
<!--#include virtual="footer.html" -->
|
|
</BODY>
|
|
</HTML>
|
|
|