Showing nginx limit_req in error logs

Hi,

I have EasyEngine installed in my server. I also installed fail2ban to be able to ban IPs that have been trying to attack Wordpress installation (by using the awesome limit_req you guys put in wpcommon.conf) at iptables level. It was working fine. If anyone is interested, I can share it.

The other day I was wondering why I had massive error logs, and thanks to a @miteshshah’s reply, I realised I had ee debug on, so I executed ee debug --off and voilà, everything fixed :wink:

But now, as a side effect of switching off ee debug, now limit requests don’t appear in nginx error logs, so fail2ban doesn’t find them and the IPs are not banned.

So my question is: what is the minimum debug I should enable to see those errors in the error logs?

Thanks a lot!

@xavivars

To block wordpress login attempt with fail2ban you don’t need to enable debug.

Refer: https://rtcamp.com/tutorials/nginx/fail2ban/

Hi @miteshshah,

That’s exactly what I did, but now (for some reason) the error log was completely empty, and the errors were not appearing even if I had a lot this kind of requests (looking at the access.log).

I’ve restarted everything, forced a “ban” from a different IP and it worked, so probably there was something in the configuration that was not loaded properly.

Thanks anyway! You guys rock!

Hello @xavivars

I hope your query is resolved. I am closing this support topic for now.

Feel free to create a new support topic if you have any queries further. :slight_smile: