Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache mod evasive leads to permission denied of index.php

For security reasons I installed the apache modules security and evasive. No I get sometimes the Error

Forbidden You don't have permission to access /index.php on this server.

The logfile of apache shows me: [Tue May 12 14:42:32.825039 2015] [evasive20:error] [pid 27443] [client 192.168.32.22:51305] client denied by server configuration: /var/www/test/index.php, referer: http://test.domain.local/index.php

I know it is important to secure Apache Webserver. But this error makes qualified working not possible. How can I prevent from this error? If I deactive the module with a2dismod evasive, the error does not come up.

Thank you.

like image 784
Perino Avatar asked May 12 '15 12:05

Perino


1 Answers

Did you set up the limit rate for URL request ? Try to add this into your apache2.conf

DOSHashTableSize 3097
DOSPageCount 5
DOSSiteCount 50
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 10

DOSPageCount is the number limit for requesting a URL. DOSPageInterval is the time limit for request a URL. Here for example you can request 5time a URL within 2seconds.

There's an article with a guy having the same problem, here it is if you want more information http://www.techtutorials.net/articles/introduction_to_apache_mod_evasive.html

like image 148
Alex Avatar answered Sep 18 '22 11:09

Alex