Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

laragon nginx can't start: #3

Closed
FupingQiu opened this issue Jul 12, 2018 · 1 comment
Closed

laragon nginx can't start: #3

FupingQiu opened this issue Jul 12, 2018 · 1 comment

Comments

@FupingQiu
Copy link
Owner

could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
2009/02/20 13:54:27 [emerg] 11372#0: the configuration file /opt/nginx/conf/nginx.conf test failed

@FupingQiu
Copy link
Owner Author

https://blog.csdn.net/dawenxiz/article/details/7312304
在 Nginx 0.6.35 的版本中,配置多个 server 虚拟主机,必须要在配置文档中 http { 里头加上 server_names_hash_bucket_size 64; 这么一句
http {
server_names_hash_bucket_size 64;
include mime.types;
default_type application/octet-stream;
………….省略
}
保存服务器名字的hash表是由指令 server_names_hash_max_size 和 server_names_hash_bucket_size所控制的。参数hash bucket size总是等于hash表的大小,并且是一路处理器缓存大小的倍数。在减少了在内存中的存取次数后,使在处理器中加速查找hash表键值成为可能。如果 hash bucket size等于一路处理器缓存的大小,那么在查找键的时候,最坏的情况下在内存中查找的次数为2。第一次是确定存储单元的地址,第二次是在存储单元中查找键值。因此,如果Nginx给出需要增大 hash max size 或 hash bucket size的提示,那么首要的是增大前一个参数的大小.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant