I use Ubuntu 20.04 and Fail2ban, but errors like this are not filtered. This error appears in /var/log/nginx/error.log. How do I make settings in Fail2ban to block bots like this?
2020/12/31 18:02:34 [error] 674#674: *1003 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mydomain.com, request: "GET /wp-content/plugins/eshop-magic/download.php?file=../../../../wp-config.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "www.mydomain.com"
Note: I want to block all IP addressed trying to access non-existent web pages, using fail2ban. I'm having trouble building a proper regex on filter.d