Hey All,
I was hoping somebody could push me in the right direction.
I would like to use GeoIP in my htaccess file. I'm note sure if Directadmin has this mod_geoip2 already installed with costum apache2. Also i was wondering how to do this for directadmin, are there different steps then normal?
I just downloaded the http://geolite.maxmind.com/download/geoip/api/mod_geoip2/
And i readed the install document and the Readme document.
But because i'm afraid i will break something from my apache i will ask here how to continue:
install document says.
apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c
is this also the right way for directadmin apache, i have comstumbuild apache
===========================================================================
To build mod_geoip as a dynamically loadable module:
apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c
-I/usr/local/include is where the GeoIP.h header file is installed
-L/usr/local/lib is where the libGeoIP library is located
This will put the correct LoadModule statement.
You will need to add:
===========================================================================
Configuration
To enable the module, place
<IfModule mod_geoip.c>
GeoIPEnable On
</IfModule>
inside your httpd.conf file. ( You don't have to have the <IfModule> block,
but it's always a good idea.
( You can optionally specify the data file by using:
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPDBFile /usr/tmp/GeoIP.dat
</IfModule>
)
See the README file for more details on the configuration
===========================================================================
Also i'm not sure where to put the GeoIP.dat file. I read default location (e.g. /usr/local/share/GeoIP/GeoIP.dat) >Should i create this directory GeoIP and place it there?
Or can i place it also under /home/username/domains/site.com/GeoIP/GeoIP.dat
Do i need to download the new GeoIP.dat every month? and replace it by hand?
I was hoping somebody could push me in the right direction.
I would like to use GeoIP in my htaccess file. I'm note sure if Directadmin has this mod_geoip2 already installed with costum apache2. Also i was wondering how to do this for directadmin, are there different steps then normal?
I just downloaded the http://geolite.maxmind.com/download/geoip/api/mod_geoip2/
And i readed the install document and the Readme document.
But because i'm afraid i will break something from my apache i will ask here how to continue:
install document says.
apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c
is this also the right way for directadmin apache, i have comstumbuild apache
===========================================================================
To build mod_geoip as a dynamically loadable module:
apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c
-I/usr/local/include is where the GeoIP.h header file is installed
-L/usr/local/lib is where the libGeoIP library is located
This will put the correct LoadModule statement.
You will need to add:
===========================================================================
Configuration
To enable the module, place
<IfModule mod_geoip.c>
GeoIPEnable On
</IfModule>
inside your httpd.conf file. ( You don't have to have the <IfModule> block,
but it's always a good idea.
( You can optionally specify the data file by using:
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPDBFile /usr/tmp/GeoIP.dat
</IfModule>
)
See the README file for more details on the configuration
===========================================================================
Also i'm not sure where to put the GeoIP.dat file. I read default location (e.g. /usr/local/share/GeoIP/GeoIP.dat) >Should i create this directory GeoIP and place it there?
Or can i place it also under /home/username/domains/site.com/GeoIP/GeoIP.dat
Do i need to download the new GeoIP.dat every month? and replace it by hand?