8
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Nginxで「could not build server_names_hash...」エラーが出た時の対処方法

Posted at

AWSの自動的に割り当てられるPublic DNSでアクセスできるようにNginxに設定してエラーがでたときのメモです。

環境

  • AWS
  • Ubuntu: 20.04.1 LTS (Focal Fossa)
  • Nginx: 1.18.0

エラーメッセージ

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

原因

  • server_nameが長すぎる。

対応方法

  • /etc/nginx/nginc.confの以下の箇所を修正してNginx再起動
#        server_names_hash_bucket_size 64;
        server_names_hash_bucket_size 128;

参考

8
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?