logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Selective logging
Author
webavatar



Joined: 20 Nov 2016
Posts: 5
Location: San Francisco

PostPosted: Sun 20 Nov '16 22:59    Post subject: Selective logging Reply with quote

Hello,
Apache newbie here; I have a question...

I maintain some wordpress websites and I have fail2ban configured to monitor the access.log for failed login attempts. I have wordpress configured to reply to these failures with a "401".

Can Apache be configured to send all these "401" replies to a logfile that is different from the main "access.log"? There are multiple sites on this server and I'm thinking that it would be better if fail2ban has smaller logfiles to parse through - files with just the error replies (to decrease the load on the system).

Thanks in advance for any advice.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 26 Nov '16 10:38    Post subject: Reply with quote

Maybe with

Code:
%401,403{Referer}i


Seee https://httpd.apache.org/docs/current/mod/mod_log_config.html Search for Modifiers

If you found the solution please let us know.
Back to top


Reply to topic   Topic: Selective logging View previous topic :: View next topic
Post new topic   Forum Index -> Apache