could not build the server_names_hash, you should increase server_names_hash_bucket_size

After adding a virtual host on nginx, i got following error on restart

root@server70 [/etc/init.d]# service nginx restart
2009/06/19 12:22:17 [emerg] 4322#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
2009/06/19 12:22:17 [emerg] 4322#0: the configuration file /etc/nginx/nginx.conf test failed
root@server70 [/etc/init.d]#

Error is fixed by editing nginx.conf

vi /etc/nginx/nginx.conf

Find

http {

Add below

server_names_hash_bucket_size   64;

Posted in Web Server