Anyone here using the GeoIP module here please?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NickJ
    replied
    Hello Chris,

    Yes, I just came in. I have replied to your PM.

    Leave a comment:


  • _Chris_
    replied
    Originally posted by NickJ View Post
    Hello Chris,

    I have never tried it on our server but while searching for relevant issue I come across one solution : "GeoIPDBFile command wil not work in .htaccess."

    You will need to include "GeoIP.dat" file in your httpd configuration file i.e httpd.conf.

    Code:
    Make sure that your [B]httpd.conf[/B] file look something like this.
    
    GeoIPEnable On
    GeoIPDBFile /<path for your>/GeoIP.dat
    
    SetEnvIf GEOIP_COUNTRY_CODE GB AllowCountry
    -----------
    Add following code in your [B] .htaccess[/B] file under your domain.
    
    Deny from all
    Allow from env=AllowCountry
    Hope it will work for you
    Did you get the PM, Nick?

    Leave a comment:


  • Cristiano
    replied
    Originally posted by _Chris_ View Post
    Many thanks Nick, Christiano and Ronnie - the info is appreciated. Currently, in my .htaccess file, is :

    GeoIPEnable On
    GeoIPDBFile /opt/geoip/share/GeoIP/GeoIP.dat

    RewriteEngine on
    RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(CA|UK|US|MX)$
    RewriteRule ^(.*)$ http://www.northamerica.com$1 [L]

    Should that work please?

    Thanks.

    Chris
    Yeah, it should. The same code is mentioned at MaxMind

    Leave a comment:


  • _Chris_
    replied
    Many thanks Nick, Christiano and Ronnie - the info is appreciated. Currently, in my .htaccess file, is :

    GeoIPEnable On
    GeoIPDBFile /opt/geoip/share/GeoIP/GeoIP.dat

    RewriteEngine on
    RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(CA|UK|US|MX)$
    RewriteRule ^(.*)$ http://www.northamerica.com$1 [L]

    Should that work please?

    Thanks.

    Chris

    Leave a comment:


  • NickJ
    replied
    Hello Chris,

    I have never tried it on our server but while searching for relevant issue I come across one solution : "GeoIPDBFile command wil not work in .htaccess."

    You will need to include "GeoIP.dat" file in your httpd configuration file i.e httpd.conf.

    Code:
    Make sure that your [B]httpd.conf[/B] file look something like this.
    
    GeoIPEnable On
    GeoIPDBFile /<path for your>/GeoIP.dat
    
    SetEnvIf GEOIP_COUNTRY_CODE GB AllowCountry
    -----------
    Add following code in your [B] .htaccess[/B] file under your domain.
    
    Deny from all
    Allow from env=AllowCountry
    Hope it will work for you

    Leave a comment:


  • ronniev
    replied
    Hello,

    Please refer this URL "http://www.wowtutorial.org/linux-servers/how-install-geoip-module-apache-2-378.html " to check the correct code in .htacces and httpd.conf file.

    Leave a comment:


  • Cristiano
    replied
    Hi there..

    Yeah, it looks correct. One of the examples as below

    GeoIPEnable On
    GeoIPDBFile /path/to/GeoIP.dat

    Leave a comment:


  • _Chris_
    replied
    Anyone here??

    Leave a comment:


  • Anyone here using the GeoIP module here please?

    Anyone here using the GeoIP module here please? Is the part below, for the .HTaccess file, correct ?

    GeoIPDBFile /opt/geoip/share/GeoIP/GeoIP.dat
Working...
X