summaryrefslogtreecommitdiff
path: root/etc/nginx
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-12-28 05:14:56 +0000
committerXiao Pan <gky44px1999@gmail.com>2023-12-28 05:14:56 +0000
commit036b9e6e8727c9ba494c077edde240f939fa53bc (patch)
treecdacc9a63bf48a9c2e7b08b5a191e5bbeec8f545 /etc/nginx
parent6a571f906323b342b8aca72e895c4abf343d88ff (diff)
fix: increase types_hash_max_size to fix a warning
Diffstat (limited to 'etc/nginx')
-rw-r--r--etc/nginx/nginx.conf9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf
index 951a26a8..c04087dc 100644
--- a/etc/nginx/nginx.conf
+++ b/etc/nginx/nginx.conf
@@ -32,6 +32,15 @@ http {
#gzip on;
+ # nginx warning in journal or `sudo nginx -t`: "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"
+ # default is 1024, I increased to 2048 and still throws warning, I increase 4096 and warning is gone
+ # not fully understood
+ # https://wiki.archlinux.org/title/nginx#Warning:_Could_not_build_optimal_types_hash
+ # https://nginx.org/en/docs/http/ngx_http_core_module.html
+ # https://nginx.org/en/docs/hash.html
+ # https://nginx.org/en/docs/http/server_names.html
+ types_hash_max_size 4096;
+
server {
listen 80;
# needed for ipv6