Results 1 to 3 of 3

Thread: GeoIP Globally

  1. #1

    GeoIP Globally

    I was wondering if it's possible to configure GeoIP globally via the main httpd/apache.conf

    I've inserted this code in apache.conf:

    <IfModule mod_geoip.c>
    GeoIPEnable On

    GeoIPDBFile /usr/share/GeoIP/GeoIP.dat

    RewriteCond %{HTTP_USER_AGENT} !googlebot|Msnbot|Slurp|Teoma^$ [NC]

    RewriteRule ^(.*)$ [L]


    And it doesn't seem to work.

    The same code does work in .htaccess though.

    This is on Cpanel which I'm not that familiar with, but I'm pretty sure it's inserted correctly.

    Any ideas/suggestions?

    Submit Your Proxies @

  2. My first thought is that perhaps the code isn't in the right place in httpd.conf.

    Is it in the same part of httpd.conf as your other module configurations?

    Is all your Apache config in httpd.conf, or does your httpd.conf use include files?

    Is this CentOS?

    Did you restart Apache after making the change to httpd.conf?
    Last edited by Will.Spencer; 28 October, 2009 at 05:04 AM.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  3. #3
    That should work.

    Hmm, I've seen in the maxmind forums problems with things not working when mod_geoip is loaded before other modules like mod_rewrite or mod_setevif, so make sure mod_geoip is loading after everything else (I believe this is only important in Apache 1.3.x as 2.x allows modules to specifiy their own order, but it can't hurt). Also try adding a RewriteEngine on before the RewriteCond lines just to make sure mod_rewrite is getting activated.

Similar Threads

  1. [Free] FREE PHP GeoIP Country Redirect
    By crivion in forum Scripts
    Replies: 2
    Last Post: 15 March, 2010, 18:56 PM
  2. How to install GeoIP and block foreign traffic
    By Will.Spencer in forum Web Proxies
    Replies: 3
    Last Post: 6 December, 2009, 04:35 AM
  3. GeoIP tutorial - block countries..etc
    By Keldorn in forum Programming
    Replies: 0
    Last Post: 22 September, 2009, 08:58 AM
  4. GeoIP doesn't seem to be working?
    By Zash in forum Web Proxies
    Replies: 12
    Last Post: 25 July, 2009, 21:54 PM
  5. How to use GeoIP on glype ?
    By WebEvader in forum Web Proxies
    Replies: 6
    Last Post: 15 March, 2009, 18:14 PM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts