From: Daniel Gruno Date: Sun, 13 May 2012 08:24:19 +0000 (+0000) Subject: Add the notion that negated values cannot stand alone as a requirement for access. X-Git-Tag: 2.5.0-alpha~6825 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa953498870fa92242292b07a7a1e03ba9373637;p=apache Add the notion that negated values cannot stand alone as a requirement for access. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1337806 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/howto/access.xml b/docs/manual/howto/access.xml index a24220af1b..20aa043bb6 100644 --- a/docs/manual/howto/access.xml +++ b/docs/manual/howto/access.xml @@ -68,8 +68,8 @@

The usage of these directives is:

-Require host address -Require ip ip.address +Require host address +Require ip ip.address

In the first form, address is a fully qualified @@ -85,15 +85,25 @@ Require ip ip.address syntax.

You can insert not to negate a particular requirement. + Note, that since a not is a negation of a value, it cannot + be used by itself to allow or deny a request, as not true + does not constitute false. Thus, to deny a visit using a negation, + the block must have one element that evaluates as true or false. For example, if you have someone spamming your message board, and you want to keep them out, you could do the following:

- Require not ip 10.252.46.165 + +<RequireAll> + Require all granted + Require not ip 10.252.46.165 +</RequireAll> + -

Visitors coming from that address will not be able to see - the content covered by this directive. If, instead, you have a - machine name, rather than an IP address, you can use that.

+

Visitors coming from that address (10.252.46.165) + will not be able to see the content covered by this directive. If, + instead, you have a machine name, rather than an IP address, you + can use that.

Require not host host.example.com @@ -101,8 +111,8 @@ Require ip ip.address you can specify just part of an address or domain name:

-Require not ip 192.168.205 -Require not host phishers.example.com moreidiots.example +Require not ip 192.168.205 +Require not host phishers.example.commoreidiots.example Require not gov