码迷,mamicode.com
首页 > 其他好文 > 详细

Nginx: could not build the server_names_hash 解决办法

时间:2016-09-27 11:25:01      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:

# /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: 512 or server_names_hash_bucket_size: 64
nginx: configuration file /etc/nginx/nginx.conf test failed

# tail /var/log/nginx/error.log
2015/01/28 10:21:51 [emerg] 22362#0: could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64

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

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

 

 

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

 

Nginx: could not build the server_names_hash 解决办法

标签:

原文地址:http://www.cnblogs.com/chunguang/p/5911995.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!