Enable Gzip Compression in Apache on Debian Server, Ubuntu, etc …

Open your Linux Shell/Terminal as root

Syntax :

root@server1:/etc/apache2# a2enmod deflate
root@server1:/etc/apache2# /etc/init.d/apache2 restart

Checking :

root@server:/etc/nginx# curl -I http://server-ip/css.css -H "Accept-Encoding: gzip"
HTTP/1.1 200 OK
Date: Tue, 28 Mar 2017 10:21:04 GMT
Server: Apache/2.4.10 (Debian)
Last-Modified: Mon, 27 Mar 2017 13:18:22 GMT
ETag: "13a2-54bb62d7e1dab-gzip"
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 642
Content-Type: text/css

When you see there is Content-Encoding: gzip, the gzip compression is working

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your e-mail address will not be published. Required fields are marked *

*