目錄
Installation
# R8
dnf install mod_maxminddb
conf.d/maxminddb.conf
MaxMindDBEnable On MaxMindDBFile COUNTRY_DB /usr/share/GeoIP/GeoLite2-Country.mmdb #MaxMindDBFile CITY_DB /usr/share/GeoIP/GeoLite2-City.mmdb MaxMindDBEnv MM_COUNTRY_CODE COUNTRY_DB/country/iso_code
MaxMindDBEnv
This directive assigns the lookup result to an environment variable.
Environment variable will only be exported if the data lookup succeeds.
應用: Blocking by Country
SetEnvIf MM_COUNTRY_CODE ^(HK|CN) AllowCountry Allow from env=AllowCountry