Tag Archives: could not build server_names_hash

[Solved] Nginx Error: could not build server_names_hash, you should increase server_names_hash_bucket_size

I’m setting up a new server. The HTTP server I selected is nginx. I already have 2 domains. It works normally, but when I try to add the above domain and start the server, the following error is reported

nginx: [emerg] could not build server_names_hash, you should increase server_nam 
es_hash_bucket_size: 32

Directly in nginx Add the following code to HTTP of conf

server_names_hash_bucket_size  512;