How do I turn on gzip in Apache2?

19,162

Solution 1

sudo ln -s /etc/apache2/mods-available/deflate.load /etc/apache2/mods-enabled/

and restart apache

sudo /etc/init.d/apache2 restart

Solution 2

Debian/Ubuntu have the a2* set of scripts for managing modules and vhosts. You can use a2enmod:

$ sudo a2enmod deflate
Enabling module deflate.
Run '/etc/init.d/apache2 restart' to activate new configuration!
$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2
 ... waiting                                                             [ OK ]
$
Share:
19,162

Related videos on Youtube

Alex
Author by

Alex

Updated on September 17, 2022

Comments

  • Alex
    Alex over 1 year

    I simply did :

    sudo aptitude install apache2
    

    And that's how my server is set up. No extra modules, no nothing.

    I'm on ubuntu jaunty.

  • Alex
    Alex about 14 years
    That's it? I don't have to do anything else? Everything should work correctly, as if nothing has changed?
  • cbmeeks
    cbmeeks almost 14 years
    or you can just do "sudo a2enmod deflate", which does the same thing.