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; }