韩国、日本、香港、美国CN2独立服务器与VPS主机租用! 2 0 0 5 - 2 0 2 3 十 七 年 I D C 行 业 服 务 (Q Q:278550633)

NGinx server_names_hash报错

在增加了一个虚拟主机后,执行nginx -t测试报错:

  1. could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32

于是我就在http区加上了

  1. server_names_hash_bucket_size 64;

注意:这里的只要设置32的倍数即可,不需要很大,太大的话 是用 nginx -s stop 命令停止会相对较慢, 这个参数适合就好!
http {
    include       mime.types;
    default_type  application/octet-stream;
server_names_hash_bucket_size 64;


作者:safeidc 分类:Windows技术文档 浏览:1002 评论:0