[nginx]could not build server_names_hash, you should increase server_names_hash_bucket_size: 64

nginx

アイキャッチ:Arek SochaによるPixabayからの画像

Webサーバにnginxを使用していて、仮のドメイン(短め)から正式なドメイン(長め)にしたところ、nginxが再起動しない…nginxのログを見てみると、タイトルのようなエラーが…

2020/12/01 08:51:04 [emerg] 2059#0: could not build server_names_hash, you should increase server_names_hash_bucket_size: 64

Google翻訳してみる。

server_names_hashをビルドできませんでした。server_names_hash_bucket_sizeを増やす必要があります:64

なるほどね、ドメインが長いからエラーになったのか…
なんとなく/etc/nginx/nginx.confを眺めてみる。

server_names_hash_bucket_size無いやんけ!!検索してみると追加すればいいらしい。

# vim /etc/nginx/nginx.conf
http {
    :
    server_names_hash_bucket_size 128;  // この行を追加
    :
}

nginxを再起動…………無事に起動しました!

コメント

タイトルとURLをコピーしました