PDA

View Full Version : [Solved] "Access is denied by context rewrite." error log entry detail?



Fli
07-30-2024, 07:19 AM
PROBLEM:

On a Linux server with a litespeed 6.2.2 web server are error log entries:


2024-07-30 06:36:04.041692 [INFO] [22400] [T0] [216.244.66.236:46496#APVH_www.sitehere.tld:443] Access is denied by context rewrite.

Problem with these log lines is that the message is not enough helpful in identifying a problem.

SOLUTION:

One can try to check also access log of the web server. Search for the IP from the error log entry and match the time in the access log.

I have been able to match it to this access log entry:


216.244.66.236 - - [30/Jul/2024:06:36:04 +0200] "GET /robots.txt HTTP/1.1" 403 1268 "-" "Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; [email protected])"


These "Access is denied by context rewrite." lines suggests it is about .htaccess file (inside website root directory) mod_rewrite rules. And indeed, i have been able to find .htaccess line that contained "DotBot":


RewriteCond %{HTTP_USER_AGENT} (dotbot|dotnetdotcom|dumbot|econtext|emailcollecto r|emailsiphon|emailwolf|eolasbot|eventures|extract |eyenetie|feedfinder|flaming|flashget|flicky|foobo t|fuck) [NC,OR]

it is part of the 8G htaccess firewall https://perishablepress.com/8g-firewall/ in aim to block useless bots, so such blocking seems OK.

Do you have any feedback to this issue? Is possible (how) to increase verbosity of the error log so the Access denied message is enhanced with more detail?