mirror of
https://github.com/apache/httpd.git
synced 2025-05-19 02:21:09 +03:00
All directives are now consistently capitalized. PR: Obtained from: Submitted by: Rich Bowen <rbowen@rcbowen.com> Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86205 13f79535-47bb-0310-9956-ffa450edef68
69 lines
2.1 KiB
HTML
69 lines
2.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>Access Control by URL</TITLE>
|
|
</HEAD>
|
|
|
|
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
|
|
<BODY
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#000080"
|
|
ALINK="#FF0000"
|
|
>
|
|
<!--#include virtual="header.html" -->
|
|
<H1 ALIGN="CENTER">Access Control by URL</H1>
|
|
|
|
<H2><A NAME="location">The <CODE><Location></CODE> Directive</A></H2>
|
|
|
|
<A
|
|
HREF="mod/directive-dict.html#Syntax"
|
|
REL="Help"
|
|
><STRONG>Syntax:</STRONG></A> <Location <EM>URL prefix</EM>><BR>
|
|
<A
|
|
HREF="mod/directive-dict.html#Context"
|
|
REL="Help"
|
|
><STRONG>Context:</STRONG></A> server config, virtual host<BR>
|
|
<A
|
|
HREF="mod/directive-dict.html#Status"
|
|
REL="Help"
|
|
><STRONG>Status:</STRONG></A> 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>
|
|
|