Nginxでcould not build the server_names_hashを解決した件

CentOS 5.5 (Final)
Nginx 0.8.54

Nginxの設定ファイルをテストしたところ、「server_names_hash_bucket_sizeを大きくしなさい」というエラーメッセージが表示されました。

# /etc/rc.d/init.d/nginx test
[emerg]: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
configuration file /etc/nginx/nginx.conf test failed

複数のバーチャルホストを設定してserver_names_hash_bucketが足りなくなると、このエラーが発生するようです。/etc/nginx/nginx.confでserver_names_hash_bucket_sizeを明示的に設定することで解決しました。

FILE: /etc/nginx/nginx.conf

--- /etc/nginx/nginx.conf	2011-04-14 12:20:27.000000000 +0900
+++ /etc/nginx/nginx.conf	2011-04-14 12:21:16.000000000 +0900
@@ -48,6 +48,8 @@ http {
     include       mime.types;
     default_type  application/octet-stream;
 
+    server_names_hash_bucket_size  64;
+
     log_format  access  '$remote_addr - $remote_user [$time_local] $request '
                         '"$status" $body_bytes_sent "$http_referer" '
                         '"$http_user_agent" "$http_x_forwarded_for" $request_time [$upstream_response_time]';

re Nginx公式WikiのExample Configuration