To add this to my apache2.conf what directive shall I enclose it in using the configuration below? Thank you! GeoIPEnable On GeoIPDBFile /path/to/GeoIP.dat SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry # ... place more countries here Deny from env=BlockCountry # Optional - use if you want to allow a specific IP address from the country you denied # (See http://httpd.apache.org/docs/1.3/mod/mod_access.html for more details) Allow from 10.1.2.
This goes into your global Apache configuration or in a vhost configuration if you need it for a special vhost only. Put this in a vhost configuration.