mod_geo enabled but not working on htaccess

rodogino

New member
Joined
Nov 28, 2017
Messages
3
Hi,

i have reseller hosting and i have enabled a domain with mod_geoip module v 1.1.1 when phpinfo i see module is working and loaded.

i have also GeoIP.dat file

Code:
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPDBFile /home/usernamefromdomain/domains/domainname.nl/public_html/GeoIP.dat
</IfModule>


 
SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE NL BlockCountry
Deny from env=BlockCountry

does nothing anyone knows the fix? i want block countrys by using .htaccess with geoip db
 
i want block countrys by using .htaccess with geoip db

I'm not really able to help you with your issue, but is there a reason why you want to block countries with mod_geo?

If you want to block a country server wide it would be better to look at CSF to do this.
 
I'm not really able to help you with your issue, but is there a reason why you want to block countries with mod_geo?

If you want to block a country server wide it would be better to look at CSF to do this.

Hoi Vlijmen,

geo better way working with blocking.. i have one ban script in php with geoip.inc file this one works correct....
but need directly working from htaccess.. no need for csf for this easy job i think.
 
If you only want to block Apache requests this would indeed be a way. The reason I suggested CSF is because my assumption was that you wanted to block countries due to abuse/spam. In that case not only Apache is a target but all services so your solution wouldn't be solid.

But unfortunately no experience in the needed rules.
 
@ NO no need for spam or anything else, just disallow some countrys to retrieve the page.. i dont need csf for this..

My thoughts, do you have htscanner enabled?
NO htscanner disabled. i tried with enabling it but no results so i've redisabled again.
 
Back
Top