When I run nginx -t
I get error
nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
Then I go and update nginx.conf file, line server_names_hash_bucket_size to 32.
Then I run service nginx reload
Then run again nginx -t and I am getting the same error.
Why it does not take effect and how could I fix this?
Setting to 64 does not throw this error anymore. Probably it was showing current value - 32 which was not enough.
In nginx 1.14, there is no default settings in nginx.conf, so add the server_names_hash_bucket_size 64;
into http
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
server_names_hash_bucket_size 64;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With