当我检查错误日志时,我看到很多这样的请求 - 来自单个IP的多达100个请求:
[Mon Oct 21 21:20:05 2013] [error] [client 198.204.250.82] File does not exist: /var/www/html/websql
[Mon Oct 21 21:20:06 2013] [error] [client 198.204.250.82] File does not exist: /var/www/html/phpMyAdmin
[Mon Oct 21 21:20:06 2013] [error] [client 198.204.250.82] File does not exist: /var/www/html/phpmyadmin
[Mon Oct 21 21:20:06 2013] [error] server reached MaxClients setting, consider raising the MaxClients setting
我希望能够将每个ip的连接数限制为4,因此这些黑客尝试不会超出我的MaxClients。理想情况下,任何高于4的并发请求都会在打开的连接超时后排队并解决。如果那是不可能的,那么拒绝高于4的并发请求也是可能的。
我在EC2上运行apache。有人知道一个相对简单的方法吗?