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.