You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2012/05/13 10:24:19 UTC
svn commit: r1337806 - /httpd/httpd/trunk/docs/manual/howto/access.xml
Author: humbedooh
Date: Sun May 13 08:24:19 2012
New Revision: 1337806
URL: http://svn.apache.org/viewvc?rev=1337806&view=rev
Log:
Add the notion that negated values cannot stand alone as a requirement for access.
Modified:
httpd/httpd/trunk/docs/manual/howto/access.xml
Modified: httpd/httpd/trunk/docs/manual/howto/access.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/howto/access.xml?rev=1337806&r1=1337805&r2=1337806&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/howto/access.xml (original)
+++ httpd/httpd/trunk/docs/manual/howto/access.xml Sun May 13 08:24:19 2012
@@ -68,8 +68,8 @@
<p>The usage of these directives is:</p>
<highlight language="config">
-Require host <var>address</var>
-Require ip <var>ip.address</var>
+Require host address
+Require ip ip.address
</highlight>
<p>In the first form, <var>address</var> is a fully qualified
@@ -85,15 +85,25 @@ Require ip <var>ip.address</var>
syntax.</p>
<p>You can insert <code>not</code> to negate a particular requirement.
+ Note, that since a <code>not</code> is a negation of a value, it cannot
+ be used by itself to allow or deny a request, as <em>not true</em>
+ does not constitute <em>false</em>. 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:</p>
- <highlight language="config">Require not ip 10.252.46.165</highlight>
-
- <p>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.</p>
+ <highlight language="config">
+<RequireAll>
+ Require all granted
+ Require not ip 10.252.46.165
+</RequireAll>
+</highlight>
+
+ <p>Visitors coming from that address (<code>10.252.46.165</code>)
+ 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.</p>
<highlight language="config">Require not host <var>host.example.com</var></highlight>
@@ -101,8 +111,8 @@ Require ip <var>ip.address</var>
you can specify just part of an address or domain name:</p>
<highlight language="config">
-Require not ip <var>192.168.205</var>
-Require not host <var>phishers.example.com</var> <var>moreidiots.example</var>
+Require not ip 192.168.205
+Require not host phishers.example.commoreidiots.example
Require not gov
</highlight>