0

I have installed GeoIP mod via http://dev.maxmind.com/geoip/legacy/mod_geoip2/ and have made sure the permissions are correct for www-data to read the database. We are just needing to block a directory from Great Britain due to the nature of the medical industry. When I enable it, even I am blocked from it from the US as well as GB (I would assume everywhere is). Since this is directory blocking, after adding the proper module configuration to the apache2.conf, all I would need to add is the .htaccess file to the proper directory:

<Location /geoip-enabled>
    SetEnvIf GEOIP_COUNTRY_CODE GB BlockCountry
    Deny from env=BlockCountry
</Location>

Is there anything else that should be included in the .htaccess? When it's active, it generates a 500 Internal Server Error and the logs reflect

[core:alert] [pid 23183] [client x.x.x.x:65490] /www/prime/non-uk/.htaccess: Location not allowed here from every connection.

Giacomo1968
  • 3,542
  • 27
  • 38
  • 1
    So `` is a path on your server that is something like `http://example.com/geoip-enabled`? Do you actually have `GeoIPEnable On` and `GeoIPDBFile /path/to/GeoIP.dat` set? The [examples here are fairly clear cut](http://dev.maxmind.com/geoip/legacy/mod_geoip2/) so wondering what your fuller setup is. – Giacomo1968 Sep 29 '15 at 04:21
  • As per the instructions from the link you posted (as well as the one I posted in my opening statement), I set the variables on. GeoIPEnable Off GeoIPEnableUTF8 On GeoIPOutput Env GeoIPDBFile /usr/share/GeoIP/GeoIP.dat – Whsperz Sep 29 '15 at 12:24

0 Answers0