Nginx: could not build map_hash, you should increase map_hash_bucket_size: 64
map_hash_max_size
and map_hash_bucket_size
must be in http
context, i.e. outside of map
directive.
map_hash_max_size 262144;
map_hash_bucket_size 262144;
map $uri $new_uri {
include /etc/nginx/conf.d/redirects.map;
}
I put it on the top of the http {} and it worked. Don't put it outside http {}