КЛ
Size: a a a
КЛ
Y
location / {
if ($remote_addr = "10.10.10.10") {
set $proxy_pas "https://183.23.10.4/somepath";
}
if ($remote_addr= "183.23.10.4") {
set $proxy_pas "http://10.10.10.10:8080";
}
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_request_buffering off;
proxy_pass $proxy_pas;
}
EI
EI
EI
AN
EI
Y
EI
D
АБ
map $remote_addr $header_ip {
default $remote_addr;
1.2.3.4/24 $http_x_real_ip; # ext network
172.16.0.1/24 $http_x_real_ip; # int network
}
geo $header_ip {
default $remote_addr;
1.2.3.4/24 $http_x_real_ip; # ext network
192.168.1.0/24 $http_x_real_ip; # int network
}
АБ
map $geoip_country_code $geo {
default 1;
RU 0;
UA 2;
US 3;
GB 4;
BY 6;
KZ 7;
CA 8;
FR 9;
DE 10;
IL 11;
}
proxy_set_header X-GEO $geo;
АБ