Apache mod_evasive not respecting configurations in Virtual host for specific pages in Drupal

41 Views Asked by At

I've setup mod_evasive in Apache for my Drupal 9 website by adding configurations in the Virtual host file as follows

<IfModule mod_evasive20.c>
    DOSSiteCount 50
    DOSSiteInterval 1
    DOSPageCount 10
    DOSPageInterval 1
    DOSBlockingPeriod 120
</IfModule>

This works perfectly fine for most/all of the pages in the application except for the PHP status page /admin/reports/status/php. For this page, it seems to ignore the above configs and fallback to default values. I get 403 error on every subsequent page refresh

1

There are 1 best solutions below

0
On

Wasn't able to find the root cause, but the workaround solution here was to put the mod_evasive configs in the root httpd.conf file.

For some unknown reason, the PHP page just ignores the local values mentioned in the virtual host and just relies on the master value.