← back to Abramsagency
golive-ssl-fix: raise server_names_hash_MAX_SIZE to 8192 (real overflow — bucket_size alone insufficient for 700+ vhosts)
c1a6837c15d6ad88eb32f7ce62649d6551d2aff6 · 2026-08-13 13:34:28 -0700 · Steve Abrams
Files touched
Diff
commit c1a6837c15d6ad88eb32f7ce62649d6551d2aff6
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Aug 13 13:34:28 2026 -0700
golive-ssl-fix: raise server_names_hash_MAX_SIZE to 8192 (real overflow — bucket_size alone insufficient for 700+ vhosts)
---
golive-ssl-fix.sh | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/golive-ssl-fix.sh b/golive-ssl-fix.sh
index 509085e..1f4fe94 100644
--- a/golive-ssl-fix.sh
+++ b/golive-ssl-fix.sh
@@ -11,14 +11,18 @@ HOST=agency.agentabrams.com
ssh -o StrictHostKeyChecking=accept-new "$SRV" 'bash -s' <<'EOS'
set -e
C=/etc/nginx/nginx.conf
-cp -n "$C" "$C.bak-ssl-agency" 2>/dev/null || true
-if grep -qE '^\s*server_names_hash_bucket_size' "$C"; then
- sed -i -E 's/^\s*server_names_hash_bucket_size[[:space:]]+[0-9]+;/ server_names_hash_bucket_size 128;/' "$C"
-else
- # insert just after the first "http {" line
- awk 'NR==1{f=0} /http[[:space:]]*\{/ && !f {print; print " server_names_hash_bucket_size 128;"; f=1; next} {print}' "$C" > "$C.tmp" && mv "$C.tmp" "$C"
-fi
-echo "== directive now:"; grep -n 'server_names_hash_bucket_size' "$C" || echo "(not found — check manually)"
+cp -n "$C" "$C.bak-ssl-agency2" 2>/dev/null || true
+set_dir() { # $1=directive $2=value : set if present, else insert after first http {
+ local d="$1" v="$2"
+ if grep -qE "^\s*${d}\b" "$C"; then
+ sed -i -E "s/^\s*${d}[[:space:]]+[0-9]+;/ ${d} ${v};/" "$C"
+ else
+ awk -v ins=" ${d} ${v};" 'f{print;next} /http[[:space:]]*\{/{print;print ins;f=1;next} {print}' "$C" > "$C.tmp" && mv "$C.tmp" "$C"
+ fi
+}
+set_dir server_names_hash_max_size 8192
+set_dir server_names_hash_bucket_size 128
+echo "== directives now:"; grep -nE 'server_names_hash_(max_size|bucket_size)' "$C" || echo "(not found)"
nginx -t && systemctl reload nginx && echo NGINX_RELOADED
EOS
← 9a64fc9 add golive-http-only.sh fallback: serve clean HTTP (drop 301
·
back to Abramsagency
·
add golive-ssl-diag.sh: read-only probe of why agency :443 s ca84584 →