Solving "nginx: could not build server_names_hash" error

Contact us

Solving "nginx: could not build server_names_hash" error

When you restart nginx, you may see this error:

nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 64

Check the full error by running:

sudo nginx -t

You can resolve the error, by adding this line to nginx.conf in the http block.

server_names_hash_bucket_size 128;

27 February 2020