Ivan Shmakov
2014-03-20 09:43:34 UTC
[The Apache-specific question is at the end of this posting.]
I wonder, since when it became a good idea for a major search
engine [1] to use User-Agent: strings like this?
180.76.5.80 - - [20/Mar/2014:08:42:50 +0000] "GET /[...] HTTP/1.1" 304 152 "-"
"Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2"
Until (q. v.) they fix this issue, I've decided to block access
to one of my servers from the respective network:
SetEnvIfNoCase User-Agent (bots?|ezooms|crawler|spider)\b bot_detected
<Directory /var/www/>
[...]
Order deny,allow
Deny from 2001:db8::f00 # an IP I use to test blocks
Deny from 180.76.0.0/16
Allow from env=bot_detected
</Directory>
However, what makes me curious, is whether I can use a specific
(as in: more detailed) 403 error message (or document) just for
this case? (Alas, I see no way to apply ErrorDocument [2] based
on the source IP address.)
TIA.
[1] https://en.wikipedia.org/wiki/Baidu
[2] https://httpd.apache.org/docs/2.2/mod/core.html#errordocument
I wonder, since when it became a good idea for a major search
engine [1] to use User-Agent: strings like this?
180.76.5.80 - - [20/Mar/2014:08:42:50 +0000] "GET /[...] HTTP/1.1" 304 152 "-"
"Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2"
Until (q. v.) they fix this issue, I've decided to block access
to one of my servers from the respective network:
SetEnvIfNoCase User-Agent (bots?|ezooms|crawler|spider)\b bot_detected
<Directory /var/www/>
[...]
Order deny,allow
Deny from 2001:db8::f00 # an IP I use to test blocks
Deny from 180.76.0.0/16
Allow from env=bot_detected
</Directory>
However, what makes me curious, is whether I can use a specific
(as in: more detailed) 403 error message (or document) just for
this case? (Alas, I see no way to apply ErrorDocument [2] based
on the source IP address.)
TIA.
[1] https://en.wikipedia.org/wiki/Baidu
[2] https://httpd.apache.org/docs/2.2/mod/core.html#errordocument
--
FSF associate member #7257
FSF associate member #7257