Apache access list - Does order matter ?

Ben Walton bdwalton-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Thu Jul 26 19:41:39 UTC 2012


Hi William,

> How does apache process them?  Or rather at what instance should once
> start with "allow all" before then using deny?

>From the apache manual:

The Order directive, along with the Allow and Deny directives,
controls a three-pass access control system. The first pass processes
either all Allow or all Deny directives, as specified by the Order
directive. The second pass parses the rest of the directives (Deny or
Allow). The third pass applies to all requests which do not match
either of the first two.

The case of allow all and then deny could be used as a whack-a-mole
style pest block.  Most people are fine but some network isn't
honouring your robot.txt file, for example, so you block them without
affecting anyone else.  The more common case is deny and then allow
though.


> SetEnvIf User-Agent BadBot GoAway=1
> Order allow,deny
> Allow from all
> Deny from env=GoAway

I looked at this, but I used the rewrite engine instead for a pest block:

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} 80legs
RewriteRule ^.* - [F,L]

These guys are a distributed, for hire, search engine and they really
pissed me off a few times.  They no longer get to contact us. :)

Thanks
-Ben
-- 
---------------------------------------------------------------------------------------------------------------------------
Ben Walton <bdwalton-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>

Take the risk of thinking for yourself.  Much more happiness,
truth, beauty and wisdom will come to you that way.

-Christopher Hitchens
---------------------------------------------------------------------------------------------------------------------------
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list