Mapping a User Agent to an IP address:

Hey guys,

I’m running NGINX as a front for my apache servers and I’m having
issues where mappings within the config on occasion aren’t being set.
For instance with the following config:

func $my_ip_match{
default 0; 1; 1; 1; 1;

#map the matches
map $name $match_value {
default 0;
~*name_1 $my_ip_match;
~*name_2 $my_ip_match;
~*name_3 $my_ip_match;
~*name_4 $my_ip_match;

$my_ip_match will be set if the given IP/subnet is matched, but the
subsequent mapping is randomly executed. I haven’t been able to come
up with any reason why it ocassionally doesn’t map. Is there any
reason for this?

Thanks in advance!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs