From this question I followed this answered.
I make a filter and enabled it inside the fail2ban config file. This is the filter:
# Fail2Ban filter to web requests for home directories on Apache servers
[INCLUDES]
before = apache-common.conf
[Definition]
failregex = ^<HOST> -.*"(GET|POST).*/wp-login.php/.*$
ignoreregex =
Fail2ban can't start because of error (I can not see the error specifically from the log), what's wrong in my syntax?