Re: Logging Denied Referrers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Joshua,

So, If I am reading that docs correctly, the bit I have to deny certain USer Agents should go near the top of my httpd.conf?

SetEnvIfNoCase User-Agent "^IDBot" block_bad_bots
SetEnvIfNoCase User-Agent "^$" block_bad_bots
SetEnvIfNoCase User-Agent "Java/1.4.1_04" block_bad_bots

<Directory "/">
     Order Allow,Deny
     Allow from all
     Deny from env=block_bad_bots
</Directory>

-Grant

----- Original Message ----- From: "Joshua Slive" <joshua@xxxxxxxx>
To: <users@xxxxxxxxxxxxxxxx>; "Grant Peel" <gpeel@xxxxxxxxxxxxx>
Sent: Sunday, March 30, 2008 12:53 PM
Subject: Re:  Logging Denied Referrers


On Sun, Mar 30, 2008 at 12:15 PM, Grant Peel <gpeel@xxxxxxxxxxxxx> wrote:


Hi all,

As mentioned in previous emails, I am trying to deny access via SetEnvIf
statements in my httpd.conf (to block smap bots / email harvesters etc.

I have two questions:

1. My server has several hundred VirtualHost directives. When the SetEnvIf statements are just placed in the main server config, will the block those
referrers from the VirtualHosts as well?

Yes, if placed in a <Directory> or <Location> section that is not
overridden inside the <VirtualHost>s. See:
http://httpd.apache.org/docs/2.2/sections.html#mergin


2. How can I set logging to see if SetEnvIf statements are doing what I
intended them to do?

For your access log, use a log format that reports the user agent
(such as the combined log format). Then you can just make sure the
response code is 403 for the appropriate user agents.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux