Help installing mod_geoIP?

I set mod_geoIP for cpanel based on these instructions (not very detailed, therefore this question)

At this point, I installed the module in accordance with the instructions. I also uploaded the csv file for the GeoLite country. AM I did not miss anything?

I assume that the next step is to create an entry in my .htaccess file for allowed countries:

GeoIPEnable On
GeoIPDBFile /path/to/GeoIPCountryWhois.csv

SetEnvIf GEOIP_COUNTRY_CODE US AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE CA AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE MX AllowCountry

Deny from all
Allow from env=AllowCountry

Looks like I missed something? Is there also a way to test this?

+5
source share
1 answer

I know your question is a bit outdated, but it can still use the answer.

, , , , , CSV.

Debian, :

geoip-bin , , , , 2. , , .

ENV:

GEOIP_ADDR          99.99.99.99
GEOIP_CONTINENT_CODE    NA
GEOIP_COUNTRY_CODE      US
GEOIP_COUNTRY_NAME      United States
GEOIP_REGION        TX
GEOIP_REGION_NAME       Texas
GEOIP_CITY          San Antonio
GEOIP_DMA_CODE      641
GEOIP_AREA_CODE     210
GEOIP_LATITUDE      29.488899
GEOIP_LONGITUDE     -98.398697
GEOIP_POSTAL_CODE       78218
+1

All Articles