gpt4 book ai didi

Nginx 无法启动,说 "could not build test test_types_hash"

转载 作者:行者123 更新时间:2023-12-04 22:31:47 25 4
gpt4 key购买 nike

这是我的 nginx.conf:

user www-data;
worker_processes 1;
worker_rlimit_nofile 8192;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 2048;
# debug_connection 192.168.1.1;
# multi_accept on;
}

http {
server_tokens off;
include mime.types;

access_log /var/log/nginx/access.log;

sendfile on;
tcp_nodelay on;

gzip on;

# http://wiki.nginx.org/HttpGzipModule#gzip_disable
gzip_disable "msie6";
gzip_types text/javascript text/css text/plain text/xml application/xml application/xml+rss application/x-javascript;

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*.ngx;

#tcp_nopush on;
#keepalive_timeout 0;
}

当我尝试启动 nginx 时,我看到的是:
nginx: [warn] duplicate MIME type "text/javascript" in /etc/nginx/nginx.conf:27
nginx: [emerg] could not build the test_types_hash, you should increase either test_types_hash_max_size: 2048 or test_types_hash_bucket_size: 64

这种相同的配置以前没有问题。我错过了什么?

最佳答案

在我的头撞墙几分钟后,我只是决定“这到底是怎么回事,我会修复第一个错误,看看会发生什么。”瞧,删除 gzip_types 声明中无关的文本/javascript MIME 类型解决了这个问题。

希望这是有帮助的!

关于Nginx 无法启动,说 "could not build test test_types_hash",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19579059/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com