Nginx could not build server_names_hash

一、问题

could not build server_names_hash, you should increase server_names_hash_bucket_size: 32

二、问题分析

Nginx默认的域名hash估值是32,当配置域名或二级域名过长时,将出现此问题。

三、解决

http {
    server_names_hash_bucket_size 64;
}

注意:hash 最大为:server_names_hash_max_size: 512

你可能感兴趣的:(Nginx could not build server_names_hash)