Цепочка nginx proxy

MereMortals nginx-forum at nginx.us
Mon Mar 23 21:50:59 UTC 2015


Добрый день!

В интернете решения так и не нашел.

Есть такая схема

клиент <->nginx_1 <->nginx_2<->apache

На nginx_1 настрен GeoIP и в настройках прописано:

proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $my_real_ip;
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_CITY_COUNTRY_NAME2 $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;

Но почему то до apache не доходят заголовки GEOIP_*, но доходят
X-Forwarded-For и X-Real-IP. На вход у nginx_2 заголовки приходят, проверено
через tcpdump, но почему то он их не проксирует. В чем может быть причина?

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,257606,257606#msg-257606



Подробная информация о списке рассылки nginx-ru