Iam a new Linux system admin and how can I enable gzip compression on nginx web server for JS/CSS/HTML files? How can I enable gzip/deflate in Nginx on Ubuntu Linux server? How do I configure gzip compression with NGINX web server on FreeBSD Unix server?

You need to use the ngx_http_gzip_module module. It compresses all valid HTTP responses (files) using the “gzip” method. This is useful to reduce data transfer size and speed up web pages for static assets such as JavaScript, CSS files and more. This page explains how to enable the gzip/deflate in nginx running on Linux or Unix-like systems.

How to enable  gzip/deflate compression on nginx

ADVERTISEMENTS

Steps to enable gzip compression in nginx server

Edit your nginx.conf file or create a new config file called /etc/nginx/conf.d/static_gzip.conf:

$ sudo vi /etc/nginx/nginx.conf

#nginx #linux #unix

How to enable gzip compression in Nginx on Linux / Unix
2.35 GEEK