HostOnNet Blog

could not build the server_names_hash, you should increase server_names_hash_bucket_size

Looking for Linux Server Admin or WordPress Expert? We can help.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.