From b4becea0011eb33b4a153a4503af6666040e1f4b Mon Sep 17 00:00:00 2001 From: Garrett Mills Date: Sat, 28 Feb 2026 12:25:31 -0600 Subject: [PATCH] Nginx performance tweaks --- nginx/default.conf | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/nginx/default.conf b/nginx/default.conf index f24115c..8d39fd6 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -2,8 +2,37 @@ server { listen 80; server_name localhost; absolute_redirect off; + # copies data between one FD and other from within the kernel + # faster than read() + write() + sendfile on; + + # send headers in one piece, it is better than sending them one by one + tcp_nopush on; + + # don't buffer data sent, good for small data bursts in real time + tcp_nodelay on; + + gzip on; + gzip_types + # text/html is always compressed by HttpGzipModule + text/css + text/javascript + text/xml + text/plain + text/x-component + application/javascript + application/x-javascript + application/json + application/xml + application/rss+xml + application/atom+xml + font/truetype + font/opentype + application/vnd.ms-fontobject + image/svg+xml; location / { + gzip_static on; root /usr/share/nginx/html; index index.html index.htm; }