From e8a5fbbabac288c2daacc6e727e9aa36debef98c Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Mon, 20 Apr 2026 15:24:16 +0200 Subject: [PATCH] docs: add nginx gzip configuration for JSON compression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Activity index shards compress ~90% with gzip (130 KB → 14 KB). The default nginx.conf has gzip on but gzip_types commented out, so JSON was served uncompressed. --- docs/deployment/vps.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/deployment/vps.md b/docs/deployment/vps.md index 02655f2..f4fbff8 100644 --- a/docs/deployment/vps.md +++ b/docs/deployment/vps.md @@ -293,6 +293,26 @@ ln -s /etc/nginx/sites-available/bincio /etc/nginx/sites-enabled/ nginx -t && systemctl reload nginx ``` +### Enable gzip compression + +The default `nginx.conf` has gzip on but `gzip_types` commented out, so only +HTML is compressed. Activity index shards are JSON and compress ~90% — enable +the full list: + +```bash +# In /etc/nginx/nginx.conf, uncomment the gzip block: +gzip_vary on; +gzip_proxied any; +gzip_comp_level 6; +gzip_buffers 16 8k; +gzip_http_version 1.1; +gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; +``` + +```bash +nginx -t && systemctl reload nginx +``` + You can verify the site is served correctly by hitting the IP directly: `http:///` — you should see the bincio activity feed, not the nginx welcome page.