I have aws machine on which i'm running my spring boot application. The public url of application is say "abc.com" i'm using apache2 to redirect request coming to abc.com to localhost:8080.
Some web servers are spamming my services and i want to block them using IP blacklisting. But i can't figure-out how.
Doesn't seem like i can use .htaccess (please tell me if i can and how)
So far i have tried to block ip through my apache2.conf with below code
<LocationMatch "/.*">
Order Allow,Deny
Allow from all
SetEnvif X-Forwarded-For "148\.72\.232\.128" DenyAccess\
#repeat the SetEnvlf X-Forwarded-For ... for each IP you want to block
Deny from env=DenyAccess
</LocationMatch>
but its not working. Any idea how can I do it?