深度阅读

解决Nginx 错误“could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size”

作者
作者
2023年08月22日
更新时间
6.01 分钟
阅读时间
0
阅读量

错误如下

could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size

解决方案:
修改如下

# /etc/nginx/nginx.conf
http {
    types_hash_max_size 4096;
    server_names_hash_bucket_size 128;
    ...
}

测试

nginx -t

重启查看状态

sudo systemctl restart nginx
sudo systemctl status nginx

参考链接

https://wiki.archlinux.org/title/nginx

https://stackoverflow.com/questions/46031491/nginx-on-fedora-26-could-not-build-optimal-types-hash-error-message

相关标签

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。