Here you can find instructions on how to install GeoIP module for Apache on a Directadmin server.
Based on https://github.com/maxmind/geoip-api-mod_geoip2/blob/master/INSTALL.md
Here in the example we download and compile the latest available module, at the moment of writing this post it is 1.2.10. The latest version can be found here: https://github.com/maxmind/geoip-api-mod_geoip2/releases
cd /usr/local/src
wget https://github.com/maxmind/geoip-api-mod_geoip2/archive/1.2.10.tar.gz -O GeoIP.1.2.10.tar.gz
tar -zxvf GeoIP.1.2.10.tar.gz
cd geoip-api-mod_geoip2-1.2.10/
apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c
/usr/local/directadmin/custombuild/build rewrite_confs
In the end of it you can find the file /usr/lib/apache/mod_geoip.so, if it's missing, then a compilation failed. And you should check every command for possible errors.
echo "LoadModule geoip_module /usr/lib/apache/mod_geoip.so" >> /etc/httpd/conf/extra/httpd-includes.conf
Restart Apache and test
apachectl -M 2>&1 | grep geoip
you should see:
geoip_module (shared)
That's it.