On Mon, Oct 24, 2016, at 05:20 AM, Maxim Dounin wrote:
> It's not relevant to geoip_country, but rather to the map{} block 
> before the map_hash_bucket_size directive.  Something like
> 
>     map $uri $foo {}
>     map_hash_bucket_size 4096;
> 
> is enough to trigger the error, as the map{} block requires some 
> hash bucket size to be set.  And if it is not set when parsing a 
> map{} block, it is automatically configures bucket size to a 
> default value.  An attempt to redefine bucket size later will 
> trigger the error, and this is what happens with the above 
> configuration.
> 
> The message is a bit misleading in this particular situation 
> as it is a generic one.  Though the fact that the configuration is 
> rejected is correct: nginx can't use the value specified in the 
> map_hash_bucket_size directive, and hence it is expected to reject 
> the configuration.
> 
> An obvious solution would be to specify map_hash_bucket_size 
> before the map{} block, i.e.:
> 
>     map_hash_bucket_size 4096;
>     map $uri $foo {}

Clearly explained, and the 'solution', of simply ordering the commands as 
above, works as promised.

Once you understand what's going on, "directive is duplicate in" actually makes 
 sense.

Curious, did I miss this ^^ fact in the docs somewhere?

Obviously not critical, but a more clearly descriptive/relevant error would be 
nice ....  

Thanks.

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to