这是我的 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
这种相同的配置以前可以正常工作,没有任何问题。我错过了什么?