nginx 1.11.5 'duplicate' map_hash_bucket_size error when geoip_country block used?

lists at ssl-mail.com lists at ssl-mail.com
Sat Oct 22 16:30:21 UTC 2016


I have a working nginx/1.11.5 instance, with this in config

		...
		http(
			...
	134		map_hash_bucket_size 4096;

			...
		)
		...

when I add geoip blocking

		...
		http (
	+		geoip_country /var/lib/GeoIP/GeoIP.dat;
	+		map $geoip_country_code $allowed_country {
	+			default yes;
	+			XX no; # some country
				...
	134			map_hash_bucket_size 4096;

				...
		)
		...

config check now reports

	nginx: [emerg] "map_hash_bucket_size" directive is duplicate in /etc/nginx/nginx.conf:134

simply commenting out

	-	map_hash_bucket_size 4096;
	+	#map_hash_bucket_size 4096;

fixes the config error.

Why can't 'map_hash_bucket_size' be set in the presence of the geoip_country snippet?

Config error? Bug? other?



More information about the nginx mailing list