You get a bonus - 1 coin for daily activity. Now you have 1 coin

nginx: error "could not build the server_names_hash, you should increase server_names_hash_bucket_size"

Practice



If, on the next nginx restart, it starts throwing the error

could not build the server_names_hash, you should increase server_names_hash_bucket_size

then, obviously, the server_names_hash variable holds a value lower than the current number of virtual server names configured in the nginx settings file.


To fix this: open the nginx.conf configuration file, find the "http {" block, and add the following line inside that block:

server_names_hash_bucket_size 64;

Instead of 64 - use whatever number you need.

For example, like this:

http {
...
server_names_hash_bucket_size 64;
...
}


After that, restart nginx.

Applies to: nginx

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)