I’d like to maintain a file which includes a list of ip’s which are blocked from using a site.
I understand deny from can be used to achieve this (e.g Deny from 127.0.0.1 10.0.0.1 some.other.ip.address).
However, I’d like an external file so that an individual who does not have access to the config can update a txt file with ip’s and this will then be included in the deny from.
Does anyone have any reccomendations on how this can be achieved? Any help is greatly appriciated.
Look at the Apache Include directive:
http://httpd.apache.org/docs/2.2/mod/core.html#include
You can create a seperate configuration file contain you denied list and include in any other configuration file i.e a site in sites-available. Example usage below:
In /etc/apache2/sites-enabled/yoursite.conf
In /etc/apache2/sites-access/yoursite.conf