Hi,
I want to install Apache mod_geoip module on Ubuntu 20.04;
to get GEOIP_COUNTRY_CODE environmental variable.
by this PHP code.
<?php
echo $_SERVER['GEOIP_COUNTRY_CODE'];
on the system I have installed only Apache and Nginx.
previously I had try, But not success, getting same countries. even added:
GeoIPScanProxyHeaders On
Vesta Installation cm:
sudo apt install -y libapache2-mod-geoip
Modify the file /etc/apache2/mods-enabled/geoip.conf
and remove the # in front of GeoIPDBFile - and set GeoIPENable to On:
GeoIPEnable On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat
Saved the file, and restart apache: apache2ctl restart
If some one have tested this module please suggest me some trick to get work it properly
since I can’t change PHP code.