Nginx: could not build the server_names_hash 解决办法

# /etc/init.d/nginx reload
* Reloading nginx configuration nginx [fail] # nginx -t
nginx: [emerg] could not build the server_names_hash, you should increase either server_names_hash_max_size: or server_names_hash_bucket_size:
nginx: configuration file /etc/nginx/nginx.conf test failed # tail /var/log/nginx/error.log
// :: [emerg] #: could not build the server_names_hash, you should increase either server_names_hash_max_size: or server_names_hash_bucket_size:

解决办法是在 nginx 配置文件的 http 段中增加如下配置:

# vi /etc/nginx/nginx.conf
...
http {
...
server_names_hash_max_size ;
server_names_hash_bucket_size ;
...
}
...

原文:http://www.vpsee.com/2015/02/nginx-could-not-build-the-server_names_hash/

上一篇:Win10 x64 + CUDA 10.0 + cuDNN v7.5 + TensorFlow GPU 1.13 安装指南


下一篇:Caffe + Ubuntu 15.04 + CUDA 7.0 安装以及配置