The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]




Версия для распечатки Пред. тема | След. тема
Новые ответы [ Отслеживать ]
помогите понять почему GeoIp не работает (nginx), !*! evgeniy123, 27-Июн-17, 05:52  [смотреть все]
Здравствуйте. Есть nginx с установлений из стандартных пакетов Ubuntu.  nginx version: nginx/1.10.3 .   Хочу подключить GeoIp что бы ловить в $_SERVER разные данные.  в main  добавил   load_module "modules/ngx_http_geoip_module.so";    
http{

geoip_country /var/www/pmn/data/Maxmind_GeoIp/GeoIP.dat; # the country IP database
geoip_city /var/www/pmn/data/Maxmind_GeoIp/GeoLiteCity.dat; # the city IP database    

...

include cfreal;  
}

cfreal:

### SET GEOIP Variables ###
proxy_set_header GEOIP_COUNTRY_CODE $geoip_country_code;
proxy_set_header GEOIP_COUNTRY_CODE3 $geoip_country_code3;
proxy_set_header GEOIP_COUNTRY_NAME $geoip_country_name;

proxy_set_header GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code;
proxy_set_header GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3;
proxy_set_header GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name;
proxy_set_header GEOIP_REGION $geoip_region;
proxy_set_header GEOIP_CITY $geoip_city;
proxy_set_header GEOIP_POSTAL_CODE $geoip_postal_code;
proxy_set_header GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code;
proxy_set_header GEOIP_LATITUDE $geoip_latitude;
proxy_set_header GEOIP_LONGITUDE $geoip_longitude;  


root@site:/etc/nginx# ldconfig -v | grep GeoIP
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.23.so is the dynamic linker, ignoring

        libGeoIP.so.1 -> libGeoIP.so.1.6.9  

делаю . print_r($_SERVER)
  и не вижу никаких дополнительных значений. Может не так что делаю или нужно компилировать именно nginx  ?




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру