Nginx でどんどこバーチャルホストを追加していると、以下の様なエラーが表示されて設定ファイルの再読み込みができなくなることがあります。
nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 64
まぁ、言ってるとおりですね。
server_names_hash_bucket が足りなくなってるので増やせよっつってるので、/etc/nginx/nginx.conf に以下を追加しましょう。
網元使ってる場合は /etc/nginx/nginx.conf が再起動時に元に戻ってしまうので /etc/nginx/conf.d/00_server_name_hash_settings.conf という名前で、以下の内容のファイルを作ってやってください。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server_names_hash_bucket_size 128; | |
server_names_hash_max_size 1024; |
コメントを残す