Fail2Ban incorrectly reads ModSecurity's logs: it detects local IP instead of the client IP and blocks it
All websites are down:
error 502 Bad Gateway
Nginx is enabled on a server
Server IP is blocked by Fail2ban.
This is Plesk bug with ID #PPPM-4408 which was fixed in Plesk Onyx.
Upgrade to the latest Plesk version.
As a workaround, set the following parameter in
failregex = ^X-Real-IP:\\s<HOST>.*$