Pretty old post but I really want to bring some light into the darkness. The answer itself is quite simple.
DR;TL Variables in NGINX are always global and once defined accessable from anywhere in the configuration. Therefore it would not make any sense to define a map in a server or location block.
map creates a new variable whose value depends on values of one or more of the source variables specified in the first parameter.
example configuration:
map $host $myvar {
example.com "test";
foo.com "for";
}
As variables in NGINX are ALWAYS global and once defined available anywhere else in the configuration. So it wouldn’t make any sense to move the map into a location or server block. The interesting fact with our map directive is when the variable myvar will receive its value or when it will be assigned?
map assigns the value to the variable once the variable will be used in your configuration
That means you can define the map in the http context but the value will be assigned at the point you are accessing $myvar in your nginx configuration.
Back to your question:
As NGINX variables are always global, having a map per server block would not make sense as they would be global anyway.