如何打开Apache2中的gzip?

我只是做了:

sudo aptitude install apache2 

这就是我的服务器设置。 没有额外的模块,没有什么。

我在Ubuntu的jaunty。

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

并重新启动Apache

 sudo /etc/init.d/apache2 restart 

Debian / Ubuntu有一套pipe理模块和虚拟主机的脚本。 你可以使用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 ] $ 

检查这本手册 ,描述得相当清楚,适用于像debian这样的系统