开发 · 4月 4, 2022 0

解决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”

内容纲要

错误如下

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

%d 博主赞过: