DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

GeoIP for Apache on Directadmin server

| 14:09:14 30.12.2018

Here you can find instructions on how to install GeoIP module for Apache on a Directadmin server.

Based on

Compile module

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:

cd /usr/local/src
wget -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/, if it's missing, then a compilation failed. And you should check every command for possible errors.

Activate module in Apache

echo "LoadModule geoip_module       /usr/lib/apache/" >> /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.

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.

All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition