We have a requirement to block users from certain countries from accessing certain pages,please help us if anyone have implemented this solution already with AEM and dispatcher with Apache. We have already tried having an .htaccess with all possible IP for a country but is not a feasible one since we have to update those country IP list frequently also tried MaxDB but failing at the step of including MaxDB module at Apache.
Please let us know if any alternatives or detailed step available to acheive above mentioned requirement, thanks for your help in advance.
Happy New Year 2018
Thanks for the suggestion,we tried executing the commands but unfortunately mod_geoip package is not present in repository.
# sudo yum install GeoIP GeoIP-devel zlib-devel mod_geoip
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
cloudpassage | 951 B 00:00:00
rhui-REGION-client-config-server-7 | 2.9 kB 00:00:00
rhui-REGION-rhel-server-releases | 3.5 kB 00:00:00
rhui-REGION-rhel-server-rh-common | 3.8 kB 00:00:00
No package GeoIP-devel available.
No package mod_geoip available.
Provided link is not working we are getting 404 error while following the steps mentioned in URL .
--2019-01-21 18:37:38-- http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
Resolving geolite.maxmind.com (geolite.maxmind.com)... 126.96.36.199, 188.8.131.52, 2606:4700::6810:262f, ...
Connecting to geolite.maxmind.com (geolite.maxmind.com)|184.108.40.206|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-21 18:37:38 ERROR 404: Not Found.
Try this, it has both csv and binary formats --- https://dev.maxmind.com/geoip/geoip2/geolite2/
Off the topic, I'm curious to understand the reason for not handling this use case before even the request reaches apache (LB or CDN)? Are there any constraints that you must do it on apache?