Knowledgebase

Block GET Requests to specific files

Posted by dannet, 04-12-2009, 12:36 PM
Hello, I am getting a lot of GET requests from different IPs to 4 nonexistent PHP files on my server. Is there any way to block the requests to avoid the resources use of apache that these requests are generating? I have installed mod_security but Im not sure about how the block rule should be. The requests are going to images/log.php, images/log2.php, images/log3.php and images/logi.php of one of the sites hosted on the server, is there any way to block there requests for a specific domain or path? Thanks in advance Daniel

Posted by mwatkins, 04-12-2009, 01:08 PM
If the requests are from a limited number of IP addresses, you could add a null route for them. Also, define "a lot": grep -c "images/log" /path/to/logfile

Posted by ServerManagement, 04-12-2009, 03:58 PM
You can add a rule in the mod_security configuration file to block anything you want. Remember to restart apache once you make your changes so it takes effect.

Posted by dannet, 04-12-2009, 10:43 PM
Thanks for the replies Are always from different IP addresses, and the number is between 150 and 250 requests by second. Im trying to add the rule but Im not sure about how to create it, Im trying with: with no results



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
SMTP Problem. (Views: 611)
Help needed (Views: 532)
xname.org DNS is down (Views: 625)


Language:

Client Login

Email

Password

Remember Me

Search