目前我正在尝试使用 设置 nextcloud 服务器nginx
。现在我的 中有以下内容/etc/nginx/sites-available/nextcloud.conf
:
server {
listen 443 ssl;
server_name localhost;
(...)
types_hash_bucket_size 8192;
types_hash_max_size 8192;
ssl_certificate /nextcloud/certification/nextcloud.csr;
ssl_certificate_key /nextcloud/certification/nextcloud.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
(...)
# logging
access_log /nextcloud/access.log;
error_log /nextcloud/error.log info;
}
这是我的/etc/nginx/nginx.conf
:
(...)
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 8192;
# include all enabled servers!
include sites-enabled/*;
(...)
}
/etc/nginx/sites-available/nextcloud.conf
我创建了一个从到的软链接,/etc/nginx/sites-enabled/nextcloud.conf
因此它应该被加载。无论如何,当我运行此命令时,我收到此错误nginx -t
:
2020/11/06 16:05:43 [warn] 249785#249785: 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
我想知道为什么我已将其设置为 ,但仍会出现此信息8192
?
我创建了 ,如答案链接中所述这个帖子。这就是我创建密钥的命令:
openssl req -newkey rsa:4096 -nodes -keyout nextcloud.key -out nextcloud.csr
我已经尝试设置types_hash_bucket_size
并types_hash_max_size
执行4096
,但结果也没有任何改变。我做错了什么?