Hello,
I have cPanel and WHM on CENTOS and need to use the Maxmind GeoIP tool to redirect incoming users based on their IP address.
I found that cPanel offer a Custom Module and so I used these instructions to download and install mod_GeoIP and then rebuild Apache with the mod_GeoIP module included:
Installing Free mod_GeoIP for Apache 2.x / Cpanel / CentOS | GNU Tool Box
This went well, managed to download and install the module using Putty, then recompiled Apache using EasyApache. All seemed fine.
I then downloaded the "lite" Country database from:
Index of /download/geoip/database/GeoLiteCountry
I placed it in /usr/local/share/GeoIP.dat (which is apparently the default location).
However, now when I use "GeoIPEnable On" in my .htaccess file, I get an "Internal Server Error 500". If I add the same line to the "pre_virtualhost_global.conf" file, and then try to restart Apache, the restart fails.
Edit: Using a phpinfo() file, I can see that the module is not listed - this is obviously the cause of the issue... so how do i go about enabling it?
Does anyone know what I am doing wrong?
Many thanks.
I have cPanel and WHM on CENTOS and need to use the Maxmind GeoIP tool to redirect incoming users based on their IP address.
I found that cPanel offer a Custom Module and so I used these instructions to download and install mod_GeoIP and then rebuild Apache with the mod_GeoIP module included:
Installing Free mod_GeoIP for Apache 2.x / Cpanel / CentOS | GNU Tool Box
This went well, managed to download and install the module using Putty, then recompiled Apache using EasyApache. All seemed fine.
I then downloaded the "lite" Country database from:
Index of /download/geoip/database/GeoLiteCountry
I placed it in /usr/local/share/GeoIP.dat (which is apparently the default location).
However, now when I use "GeoIPEnable On" in my .htaccess file, I get an "Internal Server Error 500". If I add the same line to the "pre_virtualhost_global.conf" file, and then try to restart Apache, the restart fails.
Edit: Using a phpinfo() file, I can see that the module is not listed - this is obviously the cause of the issue... so how do i go about enabling it?
Does anyone know what I am doing wrong?
Many thanks.
Last edited: