Score:0

How to make Apache stop logging AH10244 [core:error] for 400 Bad Requests?

dj flag

How do you make Apache (2.4.52) stop logging AH10244 [core:error]?

[Sun Mar 13 05:23:47.884213 2022] [core:error] [pid 558:tid 140262206592768] [client 45.146.165.37:51872] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Tue Mar 15 10:19:35.439128 2022] [core:error] [pid 14291:tid 140557854676736] [client 45.77.75.45:37640] AH10244: invalid URI path (/%)

These log messages are caused by command line utilities (wget, curl, lynx) requesting ip address or vhost, e.g.

http://10.0.0.100/%
http://example.org/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh // note: a common attack vector

The only thing I've found to work so far is LogLevel notice core:crit, but I still want other core:notice messages to appear in my log, so that solution is a non-starter.

The answer very well may be, it's not possible. If so, please leave an answer letting me know.

Score:0
dj flag

LogLevel core:crit is the only way to remove the core:error messages.

This could be fine-tuned by placing different ErrorLog and/or LogLevel directives in each vhost.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.